schemars/schemars/tests/expected/schema_settings.json

63 lines
No EOL
1.1 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Outer",
"type": "object",
"properties": {
"inner": {
"anyOf": [
{
"$ref": "#/definitions/Inner"
},
{
"type": "null"
}
]
},
"int": {
"type": "integer",
"format": "int32",
"examples": [
8,
null
]
},
"value": true,
"values": {
"type": "object",
"additionalProperties": true
}
},
"required": [
"int",
"values",
"value"
],
"definitions": {
"Inner": {
"oneOf": [
{
"type": "string",
"enum": [
"UndocumentedUnit1",
"UndocumentedUnit2"
]
},
{
"description": "This is a documented unit variant",
"type": "string",
"const": "DocumentedUnit"
},
{
"type": "object",
"properties": {
"ValueNewType": true
},
"additionalProperties": false,
"required": [
"ValueNewType"
]
}
]
}
}
}