Introduce separate RootSchema type
This commit is contained in:
parent
5ede1c1c3a
commit
ef7ec38696
7 changed files with 616 additions and 79 deletions
|
@ -1,6 +1,278 @@
|
|||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"title": "Schema",
|
||||
"title": "RootSchema",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"$id": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
"$ref": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
"$schema": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
"additionalItems": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/SchemaObject"
|
||||
}
|
||||
],
|
||||
"nullable": true
|
||||
},
|
||||
"additionalProperties": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/SchemaObject"
|
||||
}
|
||||
],
|
||||
"nullable": true
|
||||
},
|
||||
"allOf": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/Schema"
|
||||
},
|
||||
"nullable": true
|
||||
},
|
||||
"anyOf": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/Schema"
|
||||
},
|
||||
"nullable": true
|
||||
},
|
||||
"const": {
|
||||
"nullable": true
|
||||
},
|
||||
"contains": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/SchemaObject"
|
||||
}
|
||||
],
|
||||
"nullable": true
|
||||
},
|
||||
"default": {
|
||||
"nullable": true
|
||||
},
|
||||
"definitions": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"$ref": "#/components/schemas/Schema"
|
||||
}
|
||||
},
|
||||
"deprecated": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
"else": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/SchemaObject"
|
||||
}
|
||||
],
|
||||
"nullable": true
|
||||
},
|
||||
"enum": {
|
||||
"type": "array",
|
||||
"items": {},
|
||||
"nullable": true
|
||||
},
|
||||
"exclusiveMaximum": {
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"nullable": true
|
||||
},
|
||||
"exclusiveMinimum": {
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"nullable": true
|
||||
},
|
||||
"format": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
"if": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/SchemaObject"
|
||||
}
|
||||
],
|
||||
"nullable": true
|
||||
},
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/Schema"
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/Schema"
|
||||
}
|
||||
}
|
||||
],
|
||||
"nullable": true
|
||||
},
|
||||
"maxItems": {
|
||||
"type": "integer",
|
||||
"format": "uint32",
|
||||
"nullable": true
|
||||
},
|
||||
"maxLength": {
|
||||
"type": "integer",
|
||||
"format": "uint32",
|
||||
"nullable": true
|
||||
},
|
||||
"maxProperties": {
|
||||
"type": "integer",
|
||||
"format": "uint32",
|
||||
"nullable": true
|
||||
},
|
||||
"maximum": {
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"nullable": true
|
||||
},
|
||||
"minItems": {
|
||||
"type": "integer",
|
||||
"format": "uint32",
|
||||
"nullable": true
|
||||
},
|
||||
"minLength": {
|
||||
"type": "integer",
|
||||
"format": "uint32",
|
||||
"nullable": true
|
||||
},
|
||||
"minProperties": {
|
||||
"type": "integer",
|
||||
"format": "uint32",
|
||||
"nullable": true
|
||||
},
|
||||
"minimum": {
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"nullable": true
|
||||
},
|
||||
"multipleOf": {
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"nullable": true
|
||||
},
|
||||
"not": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/SchemaObject"
|
||||
}
|
||||
],
|
||||
"nullable": true
|
||||
},
|
||||
"oneOf": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/Schema"
|
||||
},
|
||||
"nullable": true
|
||||
},
|
||||
"pattern": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
"patternProperties": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"$ref": "#/components/schemas/Schema"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"$ref": "#/components/schemas/Schema"
|
||||
}
|
||||
},
|
||||
"propertyNames": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/SchemaObject"
|
||||
}
|
||||
],
|
||||
"nullable": true
|
||||
},
|
||||
"readOnly": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"required": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"then": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/SchemaObject"
|
||||
}
|
||||
],
|
||||
"nullable": true
|
||||
},
|
||||
"title": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
"type": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/InstanceType"
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/InstanceType"
|
||||
}
|
||||
}
|
||||
],
|
||||
"nullable": true
|
||||
},
|
||||
"uniqueItems": {
|
||||
"type": "boolean",
|
||||
"nullable": true
|
||||
},
|
||||
"writeOnly": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"additionalProperties": true,
|
||||
"definitions": {
|
||||
"InstanceType": {
|
||||
"enum": [
|
||||
|
@ -34,10 +306,6 @@
|
|||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
"$schema": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
"additionalItems": {
|
||||
"anyOf": [
|
||||
{
|
||||
|
@ -91,12 +359,6 @@
|
|||
"default": {
|
||||
"nullable": true
|
||||
},
|
||||
"definitions": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"$ref": "#/components/schemas/Schema"
|
||||
}
|
||||
},
|
||||
"deprecated": {
|
||||
"type": "boolean"
|
||||
},
|
||||
|
@ -297,13 +559,5 @@
|
|||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
},
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/SchemaObject"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
|
@ -1,6 +1,304 @@
|
|||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"title": "Schema",
|
||||
"title": "RootSchema",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"$id": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"$ref": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"$schema": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"additionalItems": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Schema"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"additionalProperties": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Schema"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"allOf": {
|
||||
"type": [
|
||||
"array",
|
||||
"null"
|
||||
],
|
||||
"items": {
|
||||
"$ref": "#/definitions/Schema"
|
||||
}
|
||||
},
|
||||
"anyOf": {
|
||||
"type": [
|
||||
"array",
|
||||
"null"
|
||||
],
|
||||
"items": {
|
||||
"$ref": "#/definitions/Schema"
|
||||
}
|
||||
},
|
||||
"const": true,
|
||||
"contains": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Schema"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"default": true,
|
||||
"definitions": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"$ref": "#/definitions/Schema"
|
||||
}
|
||||
},
|
||||
"deprecated": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"description": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"else": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Schema"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"enum": {
|
||||
"type": [
|
||||
"array",
|
||||
"null"
|
||||
],
|
||||
"items": true
|
||||
},
|
||||
"exclusiveMaximum": {
|
||||
"type": [
|
||||
"number",
|
||||
"null"
|
||||
],
|
||||
"format": "double"
|
||||
},
|
||||
"exclusiveMinimum": {
|
||||
"type": [
|
||||
"number",
|
||||
"null"
|
||||
],
|
||||
"format": "double"
|
||||
},
|
||||
"format": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"if": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Schema"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/SingleOrVec_For_Schema"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"maxItems": {
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
],
|
||||
"format": "uint32"
|
||||
},
|
||||
"maxLength": {
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
],
|
||||
"format": "uint32"
|
||||
},
|
||||
"maxProperties": {
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
],
|
||||
"format": "uint32"
|
||||
},
|
||||
"maximum": {
|
||||
"type": [
|
||||
"number",
|
||||
"null"
|
||||
],
|
||||
"format": "double"
|
||||
},
|
||||
"minItems": {
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
],
|
||||
"format": "uint32"
|
||||
},
|
||||
"minLength": {
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
],
|
||||
"format": "uint32"
|
||||
},
|
||||
"minProperties": {
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
],
|
||||
"format": "uint32"
|
||||
},
|
||||
"minimum": {
|
||||
"type": [
|
||||
"number",
|
||||
"null"
|
||||
],
|
||||
"format": "double"
|
||||
},
|
||||
"multipleOf": {
|
||||
"type": [
|
||||
"number",
|
||||
"null"
|
||||
],
|
||||
"format": "double"
|
||||
},
|
||||
"not": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Schema"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"oneOf": {
|
||||
"type": [
|
||||
"array",
|
||||
"null"
|
||||
],
|
||||
"items": {
|
||||
"$ref": "#/definitions/Schema"
|
||||
}
|
||||
},
|
||||
"pattern": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"patternProperties": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"$ref": "#/definitions/Schema"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"$ref": "#/definitions/Schema"
|
||||
}
|
||||
},
|
||||
"propertyNames": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Schema"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"readOnly": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"required": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"then": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Schema"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"title": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"type": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/SingleOrVec_For_InstanceType"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"uniqueItems": {
|
||||
"type": [
|
||||
"boolean",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"writeOnly": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"additionalProperties": true,
|
||||
"definitions": {
|
||||
"InstanceType": {
|
||||
"enum": [
|
||||
|
@ -38,12 +336,6 @@
|
|||
"null"
|
||||
]
|
||||
},
|
||||
"$schema": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"additionalItems": {
|
||||
"anyOf": [
|
||||
{
|
||||
|
@ -94,12 +386,6 @@
|
|||
]
|
||||
},
|
||||
"default": true,
|
||||
"definitions": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"$ref": "#/definitions/Schema"
|
||||
}
|
||||
},
|
||||
"deprecated": {
|
||||
"type": "boolean"
|
||||
},
|
||||
|
@ -349,13 +635,5 @@
|
|||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/SchemaObject"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue