{
"type": "object",
"properties": {
"version": {
"type": "string",
"pattern": "^[0-9]+\\.[0-9]+$"
},
"type": {
"const": "object"
},
"additionalProperties": {
"type": "boolean"
},
"properties": {
"type": "object",
"patternProperties": {
"^feature\\.": {
"type": "object",
"properties": {
"$ref": {
"type": "string",
"pattern": "#/definitions/Feature"
}
},
"required": ["$ref"],
"additionalProperties": false
},
"^(?!feature\\.)": {
"type": "object",
"properties": {
"type": {
"enum": ["string", "integer", "number", "boolean", "array", "object"]
},
"default": {},
"description": {
"type": "string"
},
"additionalProperties": {
"$ref": "#/$defs/map_value_type"
},
"items": {
"type": "object",
"properties": {
"type": {
"enum": ["string", "integer", "number", "boolean", "object"]
},
"properties": {
"$ref": "#/$defs/shape"
},
"additionalProperties": {
"$ref": "#/$defs/map_value_type"
}
},
"required": ["type"],
"additionalProperties": false,
"allOf": [
{
"if": {
"properties": {
"type": {
"const": "object"
}
},
"not": {
"required": ["additionalProperties"]
}
},
"then": {
"required": ["properties"]
}
}
]
},
"properties": {
"$ref": "#/$defs/shape"
}
},
"required": ["type", "default", "description"],
"additionalProperties": false,
"allOf": [
{
"if": {
"properties": {
"type": {
"const": "array"
}
}
},
"then": {
"required": ["items"]
}
},
{
"if": {
"properties": {
"type": {
"const": "object"
}
},
"not": {
"required": ["additionalProperties"]
}
},
"then": {
"required": ["properties"]
}
}
]
}
},
"additionalProperties": false
}
},
"required": ["version", "type", "properties"],
"additionalProperties": false,
"$defs": {
"map_value_type": {
"type": "object",
"properties": {
"type": {
"enum": ["string", "integer", "number", "boolean"]
}
},
"required": ["type"],
"additionalProperties": false
},
"shape": {
"type": "object",
"patternProperties": {
".*": {
"type": "object",
"properties": {
"type": {
"enum": ["string", "integer", "number", "boolean", "object"]
},
"optional": {
"type": "boolean"
},
"additionalProperties": {
"$ref": "#/$defs/map_value_type"
}
},
"required": ["type"],
"additionalProperties": false,
"allOf": [
{
"if": {
"properties": {
"type": {
"const": "object"
}
}
},
"then": {
"required": ["additionalProperties"]
}
}
]
}
},
"additionalProperties": false
}
}
}