Generate schema from any serializable value (#75)
Implement schema_for_value!(...) macro
This commit is contained in:
parent
0957204bc1
commit
f6482fd460
19 changed files with 1179 additions and 5 deletions
24
docs/_includes/examples/from_value.schema.json
Normal file
24
docs/_includes/examples/from_value.schema.json
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"title": "MyStruct",
|
||||
"examples": [
|
||||
{
|
||||
"my_bool": true,
|
||||
"my_int": 123,
|
||||
"my_nullable_enum": {
|
||||
"StringNewType": "foo"
|
||||
}
|
||||
}
|
||||
],
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"my_bool": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"my_int": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"my_nullable_enum": true
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue