{
"$schema": "https://json-schema.org/draft-07/schema",
"definitions": {
// New Definitions Follow
"UntitledSingleSelectEnumSchema": {
"type": "object",
"properties": {
"type": { "const": "string" },
"title": { "type": "string" },
"description": { "type": "string" },
"enum": {
"type": "array",
"items": { "type": "string" },
"minItems": 1
}
},
"required": ["type", "enum"],
"additionalProperties": false
},
"UntitledMultiSelectEnumSchema": {
"type": "object",
"properties": {
"type": { "const": "array" },
"title": { "type": "string" },
"description": { "type": "string" },
"minItems": {
"type": "number",
"minimum": 0
},
"maxItems": {
"type": "number",
"minimum": 0
},
"items": {
"type": "object",
"properties": {
"type": { "const": "string" },
"enum": {
"type": "array",
"items": { "type": "string" },
"minItems": 1
}
},
"required": ["type", "enum"],
"additionalProperties": false
}
},
"required": ["type", "items"],
"additionalProperties": false
},
"TitledSingleSelectEnumSchema": {
"type": "object",
"required": ["type", "anyOf"],
"properties": {
"type": { "const": "string" },
"title": { "type": "string" },
"description": { "type": "string" },
"anyOf": {
"type": "array",
"items": {
"type": "object",
"required": ["const", "title"],
"properties": {
"const": { "type": "string" },
"title": { "type": "string" }
},
"additionalProperties": false
}
}
},
"additionalProperties": false
},
"TitledMultiSelectEnumSchema": {
"type": "object",
"required": ["type", "anyOf"],
"properties": {
"type": { "const": "array" },
"title": { "type": "string" },
"description": { "type": "string" },
"anyOf": {
"type": "array",
"items": {
"type": "object",
"required": ["const", "title"],
"properties": {
"const": { "type": "string" },
"title": { "type": "string" }
},
"additionalProperties": false
}
}
},
"additionalProperties": false
},
"LegacyEnumSchema": {
"properties": {
"type": {
"type": "string",
"const": "string"
},
"title": { "type": "string" },
"description": { "type": "string" },
"enum": {
"type": "array",
"items": { "type": "string" }
},
"enumNames": {
"type": "array",
"items": { "type": "string" }
}
},
"required": ["enum", "type"],
"type": "object"
},
"EnumSchema": {
"oneOf": [
{ "$ref": "#/definitions/UntitledSingleSelectEnumSchema" },
{ "$ref": "#/definitions/UntitledMultiSelectEnumSchema" },
{ "$ref": "#/definitions/TitledSingleSelectEnumSchema" },
{ "$ref": "#/definitions/TitledMultiSelectEnumSchema" },
{ "$ref": "#/definitions/LegacyEnumSchema" }
]
}
}
}