schemars/schemars/tests/expected/from_value_openapi3.json

76 lines
No EOL
1.4 KiB
JSON

{
"$schema": "https://spec.openapis.org/oas/3.0/schema/2021-09-28#/definitions/Schema",
"title": "MyStruct",
"type": "object",
"properties": {
"myInt": {
"type": "integer"
},
"myBool": {
"type": "boolean"
},
"myNullableEnum": {
"nullable": 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": {}
},
"my_tuple": {
"type": "array",
"minItems": 2,
"maxItems": 2,
"items": [
{
"type": "string",
"minLength": 1,
"maxLength": 1
},
{
"type": "integer"
}
]
}
}
}
},
"example": {
"myInt": 123,
"myBool": true,
"myNullableEnum": null,
"myInnerStruct": {
"my_map": {
"": 0.0
},
"my_vec": [
"hello",
"world"
],
"my_empty_map": {},
"my_empty_vec": [],
"my_tuple": [
"💩",
42
]
}
}
}