Implement JsonSchema on Uuid
This commit is contained in:
parent
547f81fd67
commit
008d70e52a
8 changed files with 48 additions and 2 deletions
6
schemars/tests/expected/uuid.json
Normal file
6
schemars/tests/expected/uuid.json
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"title": "Uuid",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
}
|
8
schemars/tests/uuid.rs
Normal file
8
schemars/tests/uuid.rs
Normal file
|
@ -0,0 +1,8 @@
|
|||
mod util;
|
||||
use uuid::Uuid;
|
||||
use util::*;
|
||||
|
||||
#[test]
|
||||
fn uuid() -> TestResult {
|
||||
test_default_generated_schema::<Uuid>("uuid")
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue