schemars/schemars/tests/expected/from_value_2019_09.json

76 lines
No EOL
1.4 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"title": "MyStruct",
"type": "object",
"properties": {
"myInt": {
"type": "integer"
},
"myBool": {
"type": "boolean"
},
"myNullableEnum": true,
"myInnerStruct": {
"type": "object",
"properties": {
"my_map": {
"type": "object",
"additionalProperties": {
"type": "number"
}
},
"my_vec": {
"type": "array",
"items": {
"type": "string"
}
},
"my_empty_map": {
"type": "object",
"additionalProperties": true
},
"my_empty_vec": {
"type": "array",
"items": true
},
"my_tuple": {
"type": "array",
"minItems": 2,
"maxItems": 2,
"items": [
{
"type": "string",
"minLength": 1,
"maxLength": 1
},
{
"type": "integer"
}
]
}
}
}
},
"examples": [
{
"myInt": 123,
"myBool": true,
"myNullableEnum": null,
"myInnerStruct": {
"my_map": {
"": 0.0
},
"my_vec": [
"hello",
"world"
],
"my_empty_map": {},
"my_empty_vec": [],
"my_tuple": [
"💩",
42
]
}
}
]
}