schemars/schemars/tests/expected/from_value_openapi3.json
2024-05-13 18:17:21 +01:00

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",
"example": {
"myBool": true,
"myInnerStruct": {
"my_empty_map": {},
"my_empty_vec": [],
"my_map": {
"": 0.0
},
"my_tuple": [
"💩",
42
],
"my_vec": [
"hello",
"world"
]
},
"myInt": 123,
"myNullableEnum": null
},
"properties": {
"myBool": {
"type": "boolean"
},
"myInnerStruct": {
"type": "object",
"properties": {
"my_empty_map": {
"type": "object",
"additionalProperties": true
},
"my_empty_vec": {
"type": "array",
"items": {}
},
"my_map": {
"type": "object",
"additionalProperties": {
"type": "number"
}
},
"my_tuple": {
"type": "array",
"items": [
{
"type": "string",
"maxLength": 1,
"minLength": 1
},
{
"type": "integer"
}
],
"maxItems": 2,
"minItems": 2
},
"my_vec": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"myInt": {
"type": "integer"
},
"myNullableEnum": {
"nullable": true
}
}
}