chore: checkpoint before Python removal

This commit is contained in:
2026-03-26 22:33:59 +00:00
parent 683cec9307
commit e568ddf82a
29972 changed files with 11269302 additions and 2 deletions

View File

@@ -0,0 +1,10 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Array_up_to_size_16_of_int32",
"type": "array",
"items": {
"type": "integer",
"format": "int32"
},
"maxItems": 16
}

View File

@@ -0,0 +1,5 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "String",
"type": "string"
}

View File

@@ -0,0 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Decimal",
"type": "string",
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
}

View File

@@ -0,0 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Decimal",
"type": "string",
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
}

View File

@@ -0,0 +1,17 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "MyContainer",
"type": "object",
"required": [
"associated",
"generic"
],
"properties": {
"associated": {
"type": "string"
},
"generic": {
"type": "null"
}
}
}

View File

@@ -0,0 +1,25 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Tuple_of_Array_of_uint8_and_Array_of_uint8",
"type": "array",
"items": [
{
"type": "array",
"items": {
"type": "integer",
"format": "uint8",
"minimum": 0.0
}
},
{
"type": "array",
"items": {
"type": "integer",
"format": "uint8",
"minimum": 0.0
}
}
],
"maxItems": 2,
"minItems": 2
}

View File

@@ -0,0 +1,42 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ChronoTypes",
"type": "object",
"required": [
"date_time",
"naive_date",
"naive_date_time",
"naive_time",
"weekday"
],
"properties": {
"weekday": {
"type": "string",
"enum": [
"Mon",
"Tue",
"Wed",
"Thu",
"Fri",
"Sat",
"Sun"
]
},
"date_time": {
"type": "string",
"format": "date-time"
},
"naive_date": {
"type": "string",
"format": "date"
},
"naive_date_time": {
"type": "string",
"format": "partial-date-time"
},
"naive_time": {
"type": "string",
"format": "partial-date-time"
}
}
}

View File

@@ -0,0 +1,19 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Struct",
"type": "object",
"required": [
"bar",
"foo"
],
"properties": {
"foo": {
"description": "This is a document",
"type": "integer",
"format": "int32"
},
"bar": {
"type": "boolean"
}
}
}

View File

@@ -0,0 +1,56 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "MyStruct",
"type": "object",
"properties": {
"my_int": {
"default": 0,
"type": "integer",
"format": "int32"
},
"my_bool": {
"default": false,
"type": "boolean"
},
"my_optional_string": {
"default": null,
"type": [
"string",
"null"
]
},
"my_struct2": {
"default": "i:0 b:false",
"allOf": [
{
"$ref": "#/definitions/MyStruct2"
}
]
},
"my_struct2_default_skipped": {
"$ref": "#/definitions/MyStruct2"
},
"not_serialize": {
"$ref": "#/definitions/NotSerialize"
}
},
"definitions": {
"MyStruct2": {
"type": "object",
"properties": {
"my_int": {
"default": 6,
"type": "integer",
"format": "int32"
},
"my_bool": {
"default": true,
"type": "boolean"
}
}
},
"NotSerialize": {
"type": "null"
}
}
}

View File

@@ -0,0 +1,47 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "DeprecatedEnum",
"deprecated": true,
"oneOf": [
{
"type": "string",
"enum": [
"Unit"
]
},
{
"deprecated": true,
"type": "string",
"enum": [
"DeprecatedUnitVariant"
]
},
{
"deprecated": true,
"type": "object",
"required": [
"DeprecatedStructVariant"
],
"properties": {
"DeprecatedStructVariant": {
"type": "object",
"required": [
"deprecated_field",
"foo"
],
"properties": {
"deprecated_field": {
"deprecated": true,
"type": "boolean"
},
"foo": {
"type": "integer",
"format": "int32"
}
}
}
},
"additionalProperties": false
}
]
}

View File

@@ -0,0 +1,20 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "DeprecatedStruct",
"deprecated": true,
"type": "object",
"required": [
"deprecated_field",
"foo"
],
"properties": {
"foo": {
"type": "integer",
"format": "int32"
},
"deprecated_field": {
"deprecated": true,
"type": "boolean"
}
}
}

View File

@@ -0,0 +1,45 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "This is the enum's title",
"description": "This is the enum's description.",
"oneOf": [
{
"type": "string",
"enum": [
"UndocumentedUnit",
"UndocumentedUnit2"
]
},
{
"description": "This comment is included in the generated schema :)",
"type": "string",
"enum": [
"DocumentedUnit"
]
},
{
"title": "Complex variant",
"description": "This is a struct-like variant.",
"type": "object",
"required": [
"Complex"
],
"properties": {
"Complex": {
"type": "object",
"properties": {
"my_nullable_string": {
"title": "A nullable string",
"description": "This field is a nullable string.\n\nThis is the second line!\n\nAnd this is the third!",
"type": [
"string",
"null"
]
}
}
}
},
"additionalProperties": false
}
]
}

View File

@@ -0,0 +1,21 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "OverrideDocs struct",
"description": "New description",
"type": "object",
"required": [
"my_int",
"my_undocumented_bool"
],
"properties": {
"my_int": {
"title": "My integer",
"description": "This is an i32",
"type": "integer",
"format": "int32"
},
"my_undocumented_bool": {
"type": "boolean"
}
}
}

View File

@@ -0,0 +1,35 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "This is the struct's title",
"description": "This is the struct's description.",
"type": "object",
"required": [
"my_int",
"my_undocumented_bool",
"my_unit"
],
"properties": {
"my_int": {
"title": "An integer",
"type": "integer",
"format": "int32"
},
"my_undocumented_bool": {
"type": "boolean"
},
"my_unit": {
"description": "A unit struct instance",
"allOf": [
{
"$ref": "#/definitions/MyUnitStruct"
}
]
}
},
"definitions": {
"MyUnitStruct": {
"title": "A Unit",
"type": "null"
}
}
}

View File

@@ -0,0 +1,31 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"title": "This is the struct's title",
"description": "This is the struct's description.",
"type": "object",
"required": [
"my_int",
"my_undocumented_bool",
"my_unit"
],
"properties": {
"my_int": {
"title": "An integer",
"type": "integer",
"format": "int32"
},
"my_undocumented_bool": {
"type": "boolean"
},
"my_unit": {
"description": "A unit struct instance",
"$ref": "#/definitions/MyUnitStruct"
}
},
"definitions": {
"MyUnitStruct": {
"title": "A Unit",
"type": "null"
}
}
}

View File

@@ -0,0 +1,57 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "MyStruct",
"type": "object",
"required": [
"duration",
"time"
],
"properties": {
"duration": {
"$ref": "#/definitions/Duration"
},
"time": {
"$ref": "#/definitions/SystemTime"
}
},
"definitions": {
"Duration": {
"type": "object",
"required": [
"nanos",
"secs"
],
"properties": {
"secs": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"nanos": {
"type": "integer",
"format": "uint32",
"minimum": 0.0
}
}
},
"SystemTime": {
"type": "object",
"required": [
"nanos_since_epoch",
"secs_since_epoch"
],
"properties": {
"secs_since_epoch": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"nanos_since_epoch": {
"type": "integer",
"format": "uint32",
"minimum": 0.0
}
}
}
}
}

View File

@@ -0,0 +1,20 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Either_int32_or_Either_Boolean_or_Null",
"anyOf": [
{
"type": "integer",
"format": "int32"
},
{
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
}
]
}

View File

@@ -0,0 +1,200 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Adjacent",
"oneOf": [
{
"type": "object",
"required": [
"t"
],
"properties": {
"t": {
"type": "string",
"enum": [
"UnitOne"
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"c",
"t"
],
"properties": {
"c": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"t": {
"type": "string",
"enum": [
"StringMap"
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"c",
"t"
],
"properties": {
"c": {
"$ref": "#/definitions/UnitStruct"
},
"t": {
"type": "string",
"enum": [
"UnitStructNewType"
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"c",
"t"
],
"properties": {
"c": {
"$ref": "#/definitions/Struct"
},
"t": {
"type": "string",
"enum": [
"StructNewType"
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"c",
"t"
],
"properties": {
"c": {
"type": "object",
"required": [
"bar",
"foo"
],
"properties": {
"bar": {
"type": "boolean"
},
"foo": {
"type": "integer",
"format": "int32"
}
},
"additionalProperties": false
},
"t": {
"type": "string",
"enum": [
"Struct"
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"c",
"t"
],
"properties": {
"c": {
"type": "array",
"items": [
{
"type": "integer",
"format": "int32"
},
{
"type": "boolean"
}
],
"maxItems": 2,
"minItems": 2
},
"t": {
"type": "string",
"enum": [
"Tuple"
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"t"
],
"properties": {
"t": {
"type": "string",
"enum": [
"UnitTwo"
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"c",
"t"
],
"properties": {
"c": {
"type": "integer",
"format": "int32"
},
"t": {
"type": "string",
"enum": [
"WithInt"
]
}
},
"additionalProperties": false
}
],
"definitions": {
"Struct": {
"type": "object",
"required": [
"bar",
"foo"
],
"properties": {
"bar": {
"type": "boolean"
},
"foo": {
"type": "integer",
"format": "int32"
}
}
},
"UnitStruct": {
"type": "null"
}
}
}

View File

@@ -0,0 +1,191 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Adjacent",
"oneOf": [
{
"type": "object",
"required": [
"t"
],
"properties": {
"t": {
"type": "string",
"enum": [
"UnitOne"
]
}
}
},
{
"type": "object",
"required": [
"c",
"t"
],
"properties": {
"c": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"t": {
"type": "string",
"enum": [
"StringMap"
]
}
}
},
{
"type": "object",
"required": [
"c",
"t"
],
"properties": {
"c": {
"$ref": "#/definitions/UnitStruct"
},
"t": {
"type": "string",
"enum": [
"UnitStructNewType"
]
}
}
},
{
"type": "object",
"required": [
"c",
"t"
],
"properties": {
"c": {
"$ref": "#/definitions/Struct"
},
"t": {
"type": "string",
"enum": [
"StructNewType"
]
}
}
},
{
"type": "object",
"required": [
"c",
"t"
],
"properties": {
"c": {
"type": "object",
"required": [
"bar",
"foo"
],
"properties": {
"bar": {
"type": "boolean"
},
"foo": {
"type": "integer",
"format": "int32"
}
}
},
"t": {
"type": "string",
"enum": [
"Struct"
]
}
}
},
{
"type": "object",
"required": [
"c",
"t"
],
"properties": {
"c": {
"type": "array",
"items": [
{
"type": "integer",
"format": "int32"
},
{
"type": "boolean"
}
],
"maxItems": 2,
"minItems": 2
},
"t": {
"type": "string",
"enum": [
"Tuple"
]
}
}
},
{
"type": "object",
"required": [
"t"
],
"properties": {
"t": {
"type": "string",
"enum": [
"UnitTwo"
]
}
}
},
{
"type": "object",
"required": [
"c",
"t"
],
"properties": {
"c": {
"type": "integer",
"format": "int32"
},
"t": {
"type": "string",
"enum": [
"WithInt"
]
}
}
}
],
"definitions": {
"Struct": {
"type": "object",
"required": [
"bar",
"foo"
],
"properties": {
"bar": {
"type": "boolean"
},
"foo": {
"type": "integer",
"format": "int32"
}
}
},
"UnitStruct": {
"type": "null"
}
}
}

View File

@@ -0,0 +1,135 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "External",
"oneOf": [
{
"type": "string",
"enum": [
"unitOne",
"unitTwo"
]
},
{
"type": "object",
"required": [
"stringMap"
],
"properties": {
"stringMap": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"unitStructNewType"
],
"properties": {
"unitStructNewType": {
"$ref": "#/definitions/UnitStruct"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"structNewType"
],
"properties": {
"structNewType": {
"$ref": "#/definitions/Struct"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"struct"
],
"properties": {
"struct": {
"type": "object",
"required": [
"bar",
"foo"
],
"properties": {
"bar": {
"type": "boolean"
},
"foo": {
"type": "integer",
"format": "int32"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"tuple"
],
"properties": {
"tuple": {
"type": "array",
"items": [
{
"type": "integer",
"format": "int32"
},
{
"type": "boolean"
}
],
"maxItems": 2,
"minItems": 2
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"withInt"
],
"properties": {
"withInt": {
"type": "integer",
"format": "int32"
}
},
"additionalProperties": false
}
],
"definitions": {
"Struct": {
"type": "object",
"required": [
"bar",
"foo"
],
"properties": {
"bar": {
"type": "boolean"
},
"foo": {
"type": "integer",
"format": "int32"
}
}
},
"UnitStruct": {
"type": "null"
}
}
}

View File

@@ -0,0 +1,134 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "External",
"oneOf": [
{
"type": "string",
"enum": [
"unitOne",
"unitTwo"
]
},
{
"type": "object",
"required": [
"stringMap"
],
"properties": {
"stringMap": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"unitStructNewType"
],
"properties": {
"unitStructNewType": {
"$ref": "#/definitions/UnitStruct"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"structNewType"
],
"properties": {
"structNewType": {
"$ref": "#/definitions/Struct"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"struct"
],
"properties": {
"struct": {
"type": "object",
"required": [
"bar",
"foo"
],
"properties": {
"bar": {
"type": "boolean"
},
"foo": {
"type": "integer",
"format": "int32"
}
}
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"tuple"
],
"properties": {
"tuple": {
"type": "array",
"items": [
{
"type": "integer",
"format": "int32"
},
{
"type": "boolean"
}
],
"maxItems": 2,
"minItems": 2
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"withInt"
],
"properties": {
"withInt": {
"type": "integer",
"format": "int32"
}
},
"additionalProperties": false
}
],
"definitions": {
"Struct": {
"type": "object",
"required": [
"bar",
"foo"
],
"properties": {
"bar": {
"type": "boolean"
},
"foo": {
"type": "integer",
"format": "int32"
}
}
},
"UnitStruct": {
"type": "null"
}
}
}

View File

@@ -0,0 +1,134 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Internal",
"oneOf": [
{
"type": "object",
"required": [
"typeProperty"
],
"properties": {
"typeProperty": {
"type": "string",
"enum": [
"UnitOne"
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"typeProperty"
],
"properties": {
"typeProperty": {
"type": "string",
"enum": [
"StringMap"
]
}
},
"additionalProperties": {
"type": "string"
}
},
{
"type": "object",
"required": [
"typeProperty"
],
"properties": {
"typeProperty": {
"type": "string",
"enum": [
"UnitStructNewType"
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"bar",
"foo",
"typeProperty"
],
"properties": {
"bar": {
"type": "boolean"
},
"foo": {
"type": "integer",
"format": "int32"
},
"typeProperty": {
"type": "string",
"enum": [
"StructNewType"
]
}
}
},
{
"type": "object",
"required": [
"bar",
"foo",
"typeProperty"
],
"properties": {
"bar": {
"type": "boolean"
},
"foo": {
"type": "integer",
"format": "int32"
},
"typeProperty": {
"type": "string",
"enum": [
"Struct"
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"typeProperty"
],
"properties": {
"typeProperty": {
"type": "string",
"enum": [
"UnitTwo"
]
}
},
"additionalProperties": false
},
{
"type": [
"object",
"integer"
],
"format": "int32",
"required": [
"typeProperty"
],
"properties": {
"typeProperty": {
"type": "string",
"enum": [
"WithInt"
]
}
},
"additionalProperties": false
}
]
}

View File

@@ -0,0 +1,126 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Internal",
"oneOf": [
{
"type": "object",
"required": [
"typeProperty"
],
"properties": {
"typeProperty": {
"type": "string",
"enum": [
"UnitOne"
]
}
}
},
{
"type": "object",
"required": [
"typeProperty"
],
"properties": {
"typeProperty": {
"type": "string",
"enum": [
"StringMap"
]
}
}
},
{
"type": "object",
"required": [
"typeProperty"
],
"properties": {
"typeProperty": {
"type": "string",
"enum": [
"UnitStructNewType"
]
}
}
},
{
"type": "object",
"required": [
"bar",
"foo",
"typeProperty"
],
"properties": {
"bar": {
"type": "boolean"
},
"foo": {
"type": "integer",
"format": "int32"
},
"typeProperty": {
"type": "string",
"enum": [
"StructNewType"
]
}
}
},
{
"type": "object",
"required": [
"bar",
"foo",
"typeProperty"
],
"properties": {
"bar": {
"type": "boolean"
},
"foo": {
"type": "integer",
"format": "int32"
},
"typeProperty": {
"type": "string",
"enum": [
"Struct"
]
}
}
},
{
"type": "object",
"required": [
"typeProperty"
],
"properties": {
"typeProperty": {
"type": "string",
"enum": [
"UnitTwo"
]
}
}
},
{
"type": [
"object",
"integer"
],
"format": "int32",
"required": [
"typeProperty"
],
"properties": {
"typeProperty": {
"type": "string",
"enum": [
"WithInt"
]
}
}
}
]
}

View File

@@ -0,0 +1,13 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Renamed",
"description": "Description from comment",
"type": "integer",
"enum": [
0,
1,
5,
6,
3
]
}

View File

@@ -0,0 +1,12 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Enum",
"type": "integer",
"enum": [
0,
1,
5,
6,
3
]
}

View File

@@ -0,0 +1,51 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "SimpleInternal",
"oneOf": [
{
"type": "object",
"required": [
"typeProperty"
],
"properties": {
"typeProperty": {
"type": "string",
"enum": [
"A"
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"typeProperty"
],
"properties": {
"typeProperty": {
"type": "string",
"enum": [
"B"
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"typeProperty"
],
"properties": {
"typeProperty": {
"type": "string",
"enum": [
"C"
]
}
},
"additionalProperties": false
}
]
}

View File

@@ -0,0 +1,48 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "SimpleInternal",
"oneOf": [
{
"type": "object",
"required": [
"typeProperty"
],
"properties": {
"typeProperty": {
"type": "string",
"enum": [
"A"
]
}
}
},
{
"type": "object",
"required": [
"typeProperty"
],
"properties": {
"typeProperty": {
"type": "string",
"enum": [
"B"
]
}
}
},
{
"type": "object",
"required": [
"typeProperty"
],
"properties": {
"typeProperty": {
"type": "string",
"enum": [
"C"
]
}
}
}
]
}

View File

@@ -0,0 +1,28 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "SoundOfMusic",
"oneOf": [
{
"title": "A deer",
"description": "A female deer",
"type": "string",
"enum": [
"Do"
]
},
{
"description": "A drop of golden sun",
"type": "string",
"enum": [
"Re"
]
},
{
"description": "A name I call myself",
"type": "string",
"enum": [
"Mi"
]
}
]
}

View File

@@ -0,0 +1,77 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Untagged",
"anyOf": [
{
"type": "null"
},
{
"type": "object",
"additionalProperties": {
"type": "string"
}
},
{
"$ref": "#/definitions/UnitStruct"
},
{
"$ref": "#/definitions/Struct"
},
{
"type": "object",
"required": [
"bar",
"foo"
],
"properties": {
"foo": {
"type": "integer",
"format": "int32"
},
"bar": {
"type": "boolean"
}
},
"additionalProperties": false
},
{
"type": "array",
"items": [
{
"type": "integer",
"format": "int32"
},
{
"type": "boolean"
}
],
"maxItems": 2,
"minItems": 2
},
{
"type": "integer",
"format": "int32"
}
],
"definitions": {
"UnitStruct": {
"type": "null"
},
"Struct": {
"type": "object",
"required": [
"bar",
"foo"
],
"properties": {
"foo": {
"type": "integer",
"format": "int32"
},
"bar": {
"type": "boolean"
}
}
}
}
}

View File

@@ -0,0 +1,76 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Untagged",
"anyOf": [
{
"type": "null"
},
{
"type": "object",
"additionalProperties": {
"type": "string"
}
},
{
"$ref": "#/definitions/UnitStruct"
},
{
"$ref": "#/definitions/Struct"
},
{
"type": "object",
"required": [
"bar",
"foo"
],
"properties": {
"foo": {
"type": "integer",
"format": "int32"
},
"bar": {
"type": "boolean"
}
}
},
{
"type": "array",
"items": [
{
"type": "integer",
"format": "int32"
},
{
"type": "boolean"
}
],
"maxItems": 2,
"minItems": 2
},
{
"type": "integer",
"format": "int32"
}
],
"definitions": {
"UnitStruct": {
"type": "null"
},
"Struct": {
"type": "object",
"required": [
"bar",
"foo"
],
"properties": {
"foo": {
"type": "integer",
"format": "int32"
},
"bar": {
"type": "boolean"
}
}
}
}
}

View File

@@ -0,0 +1,18 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Set_of_Foo",
"type": "array",
"items": {
"$ref": "#/definitions/Foo"
},
"uniqueItems": true,
"definitions": {
"Foo": {
"type": "string",
"enum": [
"Bar",
"Baz"
]
}
}
}

View File

@@ -0,0 +1,39 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Struct",
"examples": [
{
"bar": false,
"baz": null,
"foo": 0
},
null
],
"type": "object",
"required": [
"bar",
"foo"
],
"properties": {
"foo": {
"examples": [
8,
null
],
"type": "integer",
"format": "int32"
},
"bar": {
"type": "boolean"
},
"baz": {
"examples": [
null
],
"type": [
"string",
"null"
]
}
}
}

View File

@@ -0,0 +1,34 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Flat",
"type": "object",
"required": [
"b",
"f",
"s",
"v"
],
"properties": {
"f": {
"type": "number",
"format": "float"
},
"b": {
"type": "boolean"
},
"s": {
"type": "string"
},
"os": {
"default": "",
"type": "string"
},
"v": {
"type": "array",
"items": {
"type": "integer",
"format": "int32"
}
}
}
}

View File

@@ -0,0 +1,49 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"examples": [
{
"bool": true,
"minusOne": -1,
"null": null,
"object": {
"array": [
"foo",
"bar"
]
},
"one": 1,
"zero": 0,
"zeroPointZero": 0.0
}
],
"type": "object",
"properties": {
"bool": {
"type": "boolean"
},
"minusOne": {
"type": "integer"
},
"null": true,
"object": {
"type": "object",
"properties": {
"array": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"one": {
"type": "integer"
},
"zero": {
"type": "integer"
},
"zeroPointZero": {
"type": "number"
}
}
}

View File

@@ -0,0 +1,76 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"title": "MyStruct",
"examples": [
{
"myBool": true,
"myInnerStruct": {
"my_empty_map": {},
"my_empty_vec": [],
"my_map": {
"": 0.0
},
"my_tuple": [
"💩",
42
],
"my_vec": [
"hello",
"world"
]
},
"myInt": 123,
"myNullableEnum": null
}
],
"type": "object",
"properties": {
"myInt": {
"type": "integer"
},
"myBool": {
"type": "boolean"
},
"myNullableEnum": true,
"myInnerStruct": {
"type": "object",
"properties": {
"my_map": {
"type": "object",
"additionalProperties": {
"type": "number"
}
},
"my_vec": {
"type": "array",
"items": {
"type": "string"
}
},
"my_empty_map": {
"type": "object",
"additionalProperties": true
},
"my_empty_vec": {
"type": "array",
"items": true
},
"my_tuple": {
"type": "array",
"items": [
{
"type": "string",
"maxLength": 1,
"minLength": 1
},
{
"type": "integer"
}
],
"maxItems": 2,
"minItems": 2
}
}
}
}
}

View File

@@ -0,0 +1,76 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "MyStruct",
"examples": [
{
"myBool": true,
"myInnerStruct": {
"my_empty_map": {},
"my_empty_vec": [],
"my_map": {
"": 0.0
},
"my_tuple": [
"💩",
42
],
"my_vec": [
"hello",
"world"
]
},
"myInt": 123,
"myNullableEnum": null
}
],
"type": "object",
"properties": {
"myInt": {
"type": "integer"
},
"myBool": {
"type": "boolean"
},
"myNullableEnum": true,
"myInnerStruct": {
"type": "object",
"properties": {
"my_map": {
"type": "object",
"additionalProperties": {
"type": "number"
}
},
"my_vec": {
"type": "array",
"items": {
"type": "string"
}
},
"my_empty_map": {
"type": "object",
"additionalProperties": true
},
"my_empty_vec": {
"type": "array",
"items": true
},
"my_tuple": {
"type": "array",
"items": [
{
"type": "string",
"maxLength": 1,
"minLength": 1
},
{
"type": "integer"
}
],
"maxItems": 2,
"minItems": 2
}
}
}
}
}

View File

@@ -0,0 +1,76 @@
{
"$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema",
"title": "MyStruct",
"type": "object",
"properties": {
"myInt": {
"type": "integer"
},
"myBool": {
"type": "boolean"
},
"myNullableEnum": {
"nullable": true
},
"myInnerStruct": {
"type": "object",
"properties": {
"my_map": {
"type": "object",
"additionalProperties": {
"type": "number"
}
},
"my_vec": {
"type": "array",
"items": {
"type": "string"
}
},
"my_empty_map": {
"type": "object",
"additionalProperties": true
},
"my_empty_vec": {
"type": "array",
"items": {}
},
"my_tuple": {
"type": "array",
"items": [
{
"type": "string",
"maxLength": 1,
"minLength": 1
},
{
"type": "integer"
}
],
"maxItems": 2,
"minItems": 2
}
}
}
},
"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
}
}

View File

@@ -0,0 +1,25 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "IndexMapTypes",
"type": "object",
"required": [
"map",
"set"
],
"properties": {
"map": {
"type": "object",
"additionalProperties": {
"type": "boolean"
}
},
"set": {
"type": "array",
"items": {
"type": "integer",
"format": "int"
},
"uniqueItems": true
}
}
}

View File

@@ -0,0 +1,62 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "RecursiveOuter",
"type": "object",
"properties": {
"direct": {
"anyOf": [
{
"$ref": "#/definitions/RecursiveOuter"
},
{
"type": "null"
}
]
},
"indirect": {
"type": [
"object",
"null"
],
"required": [
"recursive"
],
"properties": {
"recursive": {
"$ref": "#/definitions/RecursiveOuter"
}
}
}
},
"definitions": {
"RecursiveOuter": {
"type": "object",
"properties": {
"direct": {
"anyOf": [
{
"$ref": "#/definitions/RecursiveOuter"
},
{
"type": "null"
}
]
},
"indirect": {
"type": [
"object",
"null"
],
"required": [
"recursive"
],
"properties": {
"recursive": {
"$ref": "#/definitions/RecursiveOuter"
}
}
}
}
}
}
}

View File

@@ -0,0 +1,23 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "MyJob",
"type": "object",
"required": [
"spec"
],
"properties": {
"spec": {
"type": "object",
"required": [
"replicas"
],
"properties": {
"replicas": {
"type": "integer",
"format": "uint32",
"minimum": 0.0
}
}
}
}
}

View File

@@ -0,0 +1,32 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "OuterEnum",
"oneOf": [
{
"type": "object",
"required": [
"InnerStruct"
],
"properties": {
"InnerStruct": {
"$ref": "#/definitions/InnerStruct"
}
},
"additionalProperties": false
}
],
"definitions": {
"InnerStruct": {
"type": "object",
"required": [
"x"
],
"properties": {
"x": {
"type": "integer",
"format": "int32"
}
}
}
}
}

View File

@@ -0,0 +1,20 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "A",
"type": "object",
"required": [
"v",
"x"
],
"properties": {
"x": {
"type": "integer",
"format": "uint8",
"minimum": 0.0
},
"v": {
"type": "integer",
"format": "int32"
}
}
}

View File

@@ -0,0 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "NoVariants",
"type": "string",
"enum": []
}

View File

@@ -0,0 +1,34 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "MyStruct",
"type": "object",
"required": [
"nonzero_signed",
"nonzero_unsigned",
"signed",
"unsigned"
],
"properties": {
"unsigned": {
"type": "integer",
"format": "uint32",
"minimum": 0.0
},
"nonzero_unsigned": {
"type": "integer",
"format": "uint32",
"minimum": 1.0
},
"signed": {
"type": "integer",
"format": "int32"
},
"nonzero_signed": {
"type": "integer",
"format": "int32",
"not": {
"const": 0
}
}
}
}

View File

@@ -0,0 +1,55 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "OsStrings",
"type": "object",
"required": [
"borrowed",
"owned"
],
"properties": {
"owned": {
"$ref": "#/definitions/OsString"
},
"borrowed": {
"$ref": "#/definitions/OsString"
}
},
"definitions": {
"OsString": {
"oneOf": [
{
"type": "object",
"required": [
"Unix"
],
"properties": {
"Unix": {
"type": "array",
"items": {
"type": "integer",
"format": "uint8",
"minimum": 0.0
}
}
}
},
{
"type": "object",
"required": [
"Windows"
],
"properties": {
"Windows": {
"type": "array",
"items": {
"type": "integer",
"format": "uint16",
"minimum": 0.0
}
}
}
}
]
}
}
}

View File

@@ -0,0 +1,24 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "MyStruct",
"type": "object",
"required": [
"camelCase",
"new_name_1",
"new_name_2"
],
"properties": {
"camelCase": {
"type": "integer",
"format": "int32"
},
"new_name_1": {
"type": "integer",
"format": "int32"
},
"new_name_2": {
"type": "integer",
"format": "int32"
}
}
}

View File

@@ -0,0 +1,89 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "MyStruct",
"type": "object",
"required": [
"bound",
"inclusive",
"range"
],
"properties": {
"range": {
"$ref": "#/definitions/Range_of_uint"
},
"inclusive": {
"$ref": "#/definitions/Range_of_double"
},
"bound": {
"$ref": "#/definitions/Bound_of_String"
}
},
"definitions": {
"Range_of_uint": {
"type": "object",
"required": [
"end",
"start"
],
"properties": {
"start": {
"type": "integer",
"format": "uint",
"minimum": 0.0
},
"end": {
"type": "integer",
"format": "uint",
"minimum": 0.0
}
}
},
"Range_of_double": {
"type": "object",
"required": [
"end",
"start"
],
"properties": {
"start": {
"type": "number",
"format": "double"
},
"end": {
"type": "number",
"format": "double"
}
}
},
"Bound_of_String": {
"oneOf": [
{
"type": "object",
"required": [
"Included"
],
"properties": {
"Included": {
"type": "string"
}
}
},
{
"type": "object",
"required": [
"Excluded"
],
"properties": {
"Excluded": {
"type": "string"
}
}
},
{
"type": "string",
"const": "Unbounded"
}
]
}
}
}

View File

@@ -0,0 +1,55 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Process",
"type": "object",
"required": [
"command_line",
"wall_time"
],
"properties": {
"command_line": {
"type": "string"
},
"wall_time": {
"$ref": "#/definitions/Duration"
},
"user_cpu_time": {
"default": {
"nanos": 0,
"secs": 0
},
"allOf": [
{
"$ref": "#/definitions/Duration"
}
]
},
"system_cpu_time": {
"default": "0.000000000s",
"allOf": [
{
"$ref": "#/definitions/Duration"
}
]
}
},
"definitions": {
"Duration": {
"type": "object",
"required": [
"nanos",
"secs"
],
"properties": {
"secs": {
"type": "integer",
"format": "int64"
},
"nanos": {
"type": "integer",
"format": "int32"
}
}
}
}
}

View File

@@ -0,0 +1,60 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "MyStruct_for_int32",
"type": "object",
"required": [
"byte_or_bool2",
"fake_map",
"s",
"unit_or_t2"
],
"properties": {
"byte_or_bool2": {
"$ref": "#/definitions/Or_for_uint8_and_Boolean"
},
"unit_or_t2": {
"$ref": "#/definitions/Or_for_Null_and_int32"
},
"s": {
"$ref": "#/definitions/Str"
},
"fake_map": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true
}
}
},
"definitions": {
"Or_for_uint8_and_Boolean": {
"anyOf": [
{
"type": "integer",
"format": "uint8",
"minimum": 0.0
},
{
"type": "boolean"
}
]
},
"Or_for_Null_and_int32": {
"anyOf": [
{
"type": "null"
},
{
"type": "integer",
"format": "int32"
}
]
},
"Str": {
"type": "string"
}
}
}

View File

@@ -0,0 +1,86 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Container",
"type": "object",
"required": [
"result1",
"result2"
],
"properties": {
"result1": {
"$ref": "#/definitions/Result_of_MyStruct_or_Array_of_String"
},
"result2": {
"$ref": "#/definitions/Result_of_Boolean_or_Null"
}
},
"definitions": {
"Result_of_MyStruct_or_Array_of_String": {
"oneOf": [
{
"type": "object",
"required": [
"Ok"
],
"properties": {
"Ok": {
"$ref": "#/definitions/MyStruct"
}
}
},
{
"type": "object",
"required": [
"Err"
],
"properties": {
"Err": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
]
},
"MyStruct": {
"type": "object",
"required": [
"foo"
],
"properties": {
"foo": {
"type": "integer",
"format": "int32"
}
}
},
"Result_of_Boolean_or_Null": {
"oneOf": [
{
"type": "object",
"required": [
"Ok"
],
"properties": {
"Ok": {
"type": "boolean"
}
}
},
{
"type": "object",
"required": [
"Err"
],
"properties": {
"Err": {
"type": "null"
}
}
}
]
}
}
}

View File

@@ -0,0 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Decimal",
"type": "string",
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
}

View File

@@ -0,0 +1,41 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Config2",
"type": "object",
"required": [
"a_cfg",
"b_cfg"
],
"properties": {
"a_cfg": {
"$ref": "#/definitions/Config"
},
"b_cfg": {
"$ref": "#/definitions/Config2"
}
},
"definitions": {
"Config": {
"type": "object",
"required": [
"test"
],
"properties": {
"test": {
"type": "string"
}
}
},
"Config2": {
"type": "object",
"required": [
"test2"
],
"properties": {
"test2": {
"type": "string"
}
}
}
}
}

View File

@@ -0,0 +1,758 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"title": "RootSchema",
"description": "The root object of a JSON Schema document.",
"type": "object",
"properties": {
"$schema": {
"description": "The `$schema` keyword.\n\nSee [JSON Schema 8.1.1. The \"$schema\" Keyword](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-8.1.1).",
"type": [
"string",
"null"
]
},
"definitions": {
"description": "The `definitions` keyword.\n\nIn JSON Schema draft 2019-09 this was replaced by $defs, but in Schemars this is still serialized as `definitions` for backward-compatibility.\n\nSee [JSON Schema 8.2.5. Schema Re-Use With \"$defs\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-8.2.5), and [JSON Schema (draft 07) 9. Schema Re-Use With \"definitions\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-9).",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/Schema"
}
},
"type": {
"description": "The `type` keyword.\n\nSee [JSON Schema Validation 6.1.1. \"type\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.1.1) and [JSON Schema 4.2.1. Instance Data Model](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-4.2.1).",
"anyOf": [
{
"$ref": "#/definitions/SingleOrVec_for_InstanceType"
},
{
"type": "null"
}
]
},
"format": {
"description": "The `format` keyword.\n\nSee [JSON Schema Validation 7. A Vocabulary for Semantic Content With \"format\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-7).",
"type": [
"string",
"null"
]
},
"enum": {
"description": "The `enum` keyword.\n\nSee [JSON Schema Validation 6.1.2. \"enum\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.1.2)",
"type": [
"array",
"null"
],
"items": true
},
"const": {
"description": "The `const` keyword.\n\nSee [JSON Schema Validation 6.1.3. \"const\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.1.3)"
},
"$ref": {
"description": "The `$ref` keyword.\n\nSee [JSON Schema 8.2.4.1. Direct References with \"$ref\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-8.2.4.1).",
"type": [
"string",
"null"
]
},
"$id": {
"description": "The `$id` keyword.\n\nSee [JSON Schema 8.2.2. The \"$id\" Keyword](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-8.2.2).",
"type": [
"string",
"null"
]
},
"title": {
"description": "The `title` keyword.\n\nSee [JSON Schema Validation 9.1. \"title\" and \"description\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.1).",
"type": [
"string",
"null"
]
},
"description": {
"description": "The `description` keyword.\n\nSee [JSON Schema Validation 9.1. \"title\" and \"description\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.1).",
"type": [
"string",
"null"
]
},
"default": {
"description": "The `default` keyword.\n\nSee [JSON Schema Validation 9.2. \"default\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.2)."
},
"deprecated": {
"description": "The `deprecated` keyword.\n\nSee [JSON Schema Validation 9.3. \"deprecated\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.3).",
"type": "boolean"
},
"readOnly": {
"description": "The `readOnly` keyword.\n\nSee [JSON Schema Validation 9.4. \"readOnly\" and \"writeOnly\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.4).",
"type": "boolean"
},
"writeOnly": {
"description": "The `writeOnly` keyword.\n\nSee [JSON Schema Validation 9.4. \"readOnly\" and \"writeOnly\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.4).",
"type": "boolean"
},
"examples": {
"description": "The `examples` keyword.\n\nSee [JSON Schema Validation 9.5. \"examples\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.5).",
"type": "array",
"items": true
},
"allOf": {
"description": "The `allOf` keyword.\n\nSee [JSON Schema 9.2.1.1. \"allOf\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.1.1).",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/Schema"
}
},
"anyOf": {
"description": "The `anyOf` keyword.\n\nSee [JSON Schema 9.2.1.2. \"anyOf\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.1.2).",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/Schema"
}
},
"oneOf": {
"description": "The `oneOf` keyword.\n\nSee [JSON Schema 9.2.1.3. \"oneOf\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.1.3).",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/Schema"
}
},
"not": {
"description": "The `not` keyword.\n\nSee [JSON Schema 9.2.1.4. \"not\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.1.4).",
"anyOf": [
{
"$ref": "#/definitions/Schema"
},
{
"type": "null"
}
]
},
"if": {
"description": "The `if` keyword.\n\nSee [JSON Schema 9.2.2.1. \"if\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.2.1).",
"anyOf": [
{
"$ref": "#/definitions/Schema"
},
{
"type": "null"
}
]
},
"then": {
"description": "The `then` keyword.\n\nSee [JSON Schema 9.2.2.2. \"then\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.2.2).",
"anyOf": [
{
"$ref": "#/definitions/Schema"
},
{
"type": "null"
}
]
},
"else": {
"description": "The `else` keyword.\n\nSee [JSON Schema 9.2.2.3. \"else\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.2.3).",
"anyOf": [
{
"$ref": "#/definitions/Schema"
},
{
"type": "null"
}
]
},
"multipleOf": {
"description": "The `multipleOf` keyword.\n\nSee [JSON Schema Validation 6.2.1. \"multipleOf\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.2.1).",
"type": [
"number",
"null"
],
"format": "double"
},
"maximum": {
"description": "The `maximum` keyword.\n\nSee [JSON Schema Validation 6.2.2. \"maximum\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.2.2).",
"type": [
"number",
"null"
],
"format": "double"
},
"exclusiveMaximum": {
"description": "The `exclusiveMaximum` keyword.\n\nSee [JSON Schema Validation 6.2.3. \"exclusiveMaximum\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.2.3).",
"type": [
"number",
"null"
],
"format": "double"
},
"minimum": {
"description": "The `minimum` keyword.\n\nSee [JSON Schema Validation 6.2.4. \"minimum\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.2.4).",
"type": [
"number",
"null"
],
"format": "double"
},
"exclusiveMinimum": {
"description": "The `exclusiveMinimum` keyword.\n\nSee [JSON Schema Validation 6.2.5. \"exclusiveMinimum\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.2.5).",
"type": [
"number",
"null"
],
"format": "double"
},
"maxLength": {
"description": "The `maxLength` keyword.\n\nSee [JSON Schema Validation 6.3.1. \"maxLength\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.3.1).",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0.0
},
"minLength": {
"description": "The `minLength` keyword.\n\nSee [JSON Schema Validation 6.3.2. \"minLength\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.3.2).",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0.0
},
"pattern": {
"description": "The `pattern` keyword.\n\nSee [JSON Schema Validation 6.3.3. \"pattern\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.3.3).",
"type": [
"string",
"null"
]
},
"items": {
"description": "The `items` keyword.\n\nSee [JSON Schema 9.3.1.1. \"items\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.1.1).",
"anyOf": [
{
"$ref": "#/definitions/SingleOrVec_for_Schema"
},
{
"type": "null"
}
]
},
"additionalItems": {
"description": "The `additionalItems` keyword.\n\nSee [JSON Schema 9.3.1.2. \"additionalItems\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.1.2).",
"anyOf": [
{
"$ref": "#/definitions/Schema"
},
{
"type": "null"
}
]
},
"maxItems": {
"description": "The `maxItems` keyword.\n\nSee [JSON Schema Validation 6.4.1. \"maxItems\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.4.1).",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0.0
},
"minItems": {
"description": "The `minItems` keyword.\n\nSee [JSON Schema Validation 6.4.2. \"minItems\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.4.2).",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0.0
},
"uniqueItems": {
"description": "The `uniqueItems` keyword.\n\nSee [JSON Schema Validation 6.4.3. \"uniqueItems\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.4.3).",
"type": [
"boolean",
"null"
]
},
"contains": {
"description": "The `contains` keyword.\n\nSee [JSON Schema 9.3.1.4. \"contains\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.1.4).",
"anyOf": [
{
"$ref": "#/definitions/Schema"
},
{
"type": "null"
}
]
},
"maxProperties": {
"description": "The `maxProperties` keyword.\n\nSee [JSON Schema Validation 6.5.1. \"maxProperties\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.5.1).",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0.0
},
"minProperties": {
"description": "The `minProperties` keyword.\n\nSee [JSON Schema Validation 6.5.2. \"minProperties\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.5.2).",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0.0
},
"required": {
"description": "The `required` keyword.\n\nSee [JSON Schema Validation 6.5.3. \"required\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.5.3).",
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true
},
"properties": {
"description": "The `properties` keyword.\n\nSee [JSON Schema 9.3.2.1. \"properties\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.2.1).",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/Schema"
}
},
"patternProperties": {
"description": "The `patternProperties` keyword.\n\nSee [JSON Schema 9.3.2.2. \"patternProperties\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.2.2).",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/Schema"
}
},
"additionalProperties": {
"description": "The `additionalProperties` keyword.\n\nSee [JSON Schema 9.3.2.3. \"additionalProperties\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.2.3).",
"anyOf": [
{
"$ref": "#/definitions/Schema"
},
{
"type": "null"
}
]
},
"propertyNames": {
"description": "The `propertyNames` keyword.\n\nSee [JSON Schema 9.3.2.5. \"propertyNames\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.2.5).",
"anyOf": [
{
"$ref": "#/definitions/Schema"
},
{
"type": "null"
}
]
}
},
"additionalProperties": true,
"definitions": {
"Schema": {
"description": "A JSON Schema.",
"anyOf": [
{
"description": "A trivial boolean JSON Schema.\n\nThe schema `true` matches everything (always passes validation), whereas the schema `false` matches nothing (always fails validation).",
"type": "boolean"
},
{
"description": "A JSON Schema object.",
"$ref": "#/definitions/SchemaObject"
}
]
},
"SchemaObject": {
"description": "A JSON Schema object.",
"type": "object",
"properties": {
"type": {
"description": "The `type` keyword.\n\nSee [JSON Schema Validation 6.1.1. \"type\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.1.1) and [JSON Schema 4.2.1. Instance Data Model](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-4.2.1).",
"anyOf": [
{
"$ref": "#/definitions/SingleOrVec_for_InstanceType"
},
{
"type": "null"
}
]
},
"format": {
"description": "The `format` keyword.\n\nSee [JSON Schema Validation 7. A Vocabulary for Semantic Content With \"format\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-7).",
"type": [
"string",
"null"
]
},
"enum": {
"description": "The `enum` keyword.\n\nSee [JSON Schema Validation 6.1.2. \"enum\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.1.2)",
"type": [
"array",
"null"
],
"items": true
},
"const": {
"description": "The `const` keyword.\n\nSee [JSON Schema Validation 6.1.3. \"const\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.1.3)"
},
"$ref": {
"description": "The `$ref` keyword.\n\nSee [JSON Schema 8.2.4.1. Direct References with \"$ref\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-8.2.4.1).",
"type": [
"string",
"null"
]
},
"$id": {
"description": "The `$id` keyword.\n\nSee [JSON Schema 8.2.2. The \"$id\" Keyword](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-8.2.2).",
"type": [
"string",
"null"
]
},
"title": {
"description": "The `title` keyword.\n\nSee [JSON Schema Validation 9.1. \"title\" and \"description\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.1).",
"type": [
"string",
"null"
]
},
"description": {
"description": "The `description` keyword.\n\nSee [JSON Schema Validation 9.1. \"title\" and \"description\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.1).",
"type": [
"string",
"null"
]
},
"default": {
"description": "The `default` keyword.\n\nSee [JSON Schema Validation 9.2. \"default\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.2)."
},
"deprecated": {
"description": "The `deprecated` keyword.\n\nSee [JSON Schema Validation 9.3. \"deprecated\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.3).",
"type": "boolean"
},
"readOnly": {
"description": "The `readOnly` keyword.\n\nSee [JSON Schema Validation 9.4. \"readOnly\" and \"writeOnly\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.4).",
"type": "boolean"
},
"writeOnly": {
"description": "The `writeOnly` keyword.\n\nSee [JSON Schema Validation 9.4. \"readOnly\" and \"writeOnly\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.4).",
"type": "boolean"
},
"examples": {
"description": "The `examples` keyword.\n\nSee [JSON Schema Validation 9.5. \"examples\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.5).",
"type": "array",
"items": true
},
"allOf": {
"description": "The `allOf` keyword.\n\nSee [JSON Schema 9.2.1.1. \"allOf\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.1.1).",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/Schema"
}
},
"anyOf": {
"description": "The `anyOf` keyword.\n\nSee [JSON Schema 9.2.1.2. \"anyOf\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.1.2).",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/Schema"
}
},
"oneOf": {
"description": "The `oneOf` keyword.\n\nSee [JSON Schema 9.2.1.3. \"oneOf\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.1.3).",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/Schema"
}
},
"not": {
"description": "The `not` keyword.\n\nSee [JSON Schema 9.2.1.4. \"not\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.1.4).",
"anyOf": [
{
"$ref": "#/definitions/Schema"
},
{
"type": "null"
}
]
},
"if": {
"description": "The `if` keyword.\n\nSee [JSON Schema 9.2.2.1. \"if\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.2.1).",
"anyOf": [
{
"$ref": "#/definitions/Schema"
},
{
"type": "null"
}
]
},
"then": {
"description": "The `then` keyword.\n\nSee [JSON Schema 9.2.2.2. \"then\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.2.2).",
"anyOf": [
{
"$ref": "#/definitions/Schema"
},
{
"type": "null"
}
]
},
"else": {
"description": "The `else` keyword.\n\nSee [JSON Schema 9.2.2.3. \"else\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.2.3).",
"anyOf": [
{
"$ref": "#/definitions/Schema"
},
{
"type": "null"
}
]
},
"multipleOf": {
"description": "The `multipleOf` keyword.\n\nSee [JSON Schema Validation 6.2.1. \"multipleOf\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.2.1).",
"type": [
"number",
"null"
],
"format": "double"
},
"maximum": {
"description": "The `maximum` keyword.\n\nSee [JSON Schema Validation 6.2.2. \"maximum\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.2.2).",
"type": [
"number",
"null"
],
"format": "double"
},
"exclusiveMaximum": {
"description": "The `exclusiveMaximum` keyword.\n\nSee [JSON Schema Validation 6.2.3. \"exclusiveMaximum\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.2.3).",
"type": [
"number",
"null"
],
"format": "double"
},
"minimum": {
"description": "The `minimum` keyword.\n\nSee [JSON Schema Validation 6.2.4. \"minimum\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.2.4).",
"type": [
"number",
"null"
],
"format": "double"
},
"exclusiveMinimum": {
"description": "The `exclusiveMinimum` keyword.\n\nSee [JSON Schema Validation 6.2.5. \"exclusiveMinimum\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.2.5).",
"type": [
"number",
"null"
],
"format": "double"
},
"maxLength": {
"description": "The `maxLength` keyword.\n\nSee [JSON Schema Validation 6.3.1. \"maxLength\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.3.1).",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0.0
},
"minLength": {
"description": "The `minLength` keyword.\n\nSee [JSON Schema Validation 6.3.2. \"minLength\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.3.2).",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0.0
},
"pattern": {
"description": "The `pattern` keyword.\n\nSee [JSON Schema Validation 6.3.3. \"pattern\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.3.3).",
"type": [
"string",
"null"
]
},
"items": {
"description": "The `items` keyword.\n\nSee [JSON Schema 9.3.1.1. \"items\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.1.1).",
"anyOf": [
{
"$ref": "#/definitions/SingleOrVec_for_Schema"
},
{
"type": "null"
}
]
},
"additionalItems": {
"description": "The `additionalItems` keyword.\n\nSee [JSON Schema 9.3.1.2. \"additionalItems\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.1.2).",
"anyOf": [
{
"$ref": "#/definitions/Schema"
},
{
"type": "null"
}
]
},
"maxItems": {
"description": "The `maxItems` keyword.\n\nSee [JSON Schema Validation 6.4.1. \"maxItems\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.4.1).",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0.0
},
"minItems": {
"description": "The `minItems` keyword.\n\nSee [JSON Schema Validation 6.4.2. \"minItems\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.4.2).",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0.0
},
"uniqueItems": {
"description": "The `uniqueItems` keyword.\n\nSee [JSON Schema Validation 6.4.3. \"uniqueItems\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.4.3).",
"type": [
"boolean",
"null"
]
},
"contains": {
"description": "The `contains` keyword.\n\nSee [JSON Schema 9.3.1.4. \"contains\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.1.4).",
"anyOf": [
{
"$ref": "#/definitions/Schema"
},
{
"type": "null"
}
]
},
"maxProperties": {
"description": "The `maxProperties` keyword.\n\nSee [JSON Schema Validation 6.5.1. \"maxProperties\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.5.1).",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0.0
},
"minProperties": {
"description": "The `minProperties` keyword.\n\nSee [JSON Schema Validation 6.5.2. \"minProperties\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.5.2).",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0.0
},
"required": {
"description": "The `required` keyword.\n\nSee [JSON Schema Validation 6.5.3. \"required\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.5.3).",
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true
},
"properties": {
"description": "The `properties` keyword.\n\nSee [JSON Schema 9.3.2.1. \"properties\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.2.1).",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/Schema"
}
},
"patternProperties": {
"description": "The `patternProperties` keyword.\n\nSee [JSON Schema 9.3.2.2. \"patternProperties\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.2.2).",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/Schema"
}
},
"additionalProperties": {
"description": "The `additionalProperties` keyword.\n\nSee [JSON Schema 9.3.2.3. \"additionalProperties\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.2.3).",
"anyOf": [
{
"$ref": "#/definitions/Schema"
},
{
"type": "null"
}
]
},
"propertyNames": {
"description": "The `propertyNames` keyword.\n\nSee [JSON Schema 9.3.2.5. \"propertyNames\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.2.5).",
"anyOf": [
{
"$ref": "#/definitions/Schema"
},
{
"type": "null"
}
]
}
},
"additionalProperties": true
},
"SingleOrVec_for_InstanceType": {
"description": "A type which can be serialized as a single item, or multiple items.\n\nIn some contexts, a `Single` may be semantically distinct from a `Vec` containing only item.",
"anyOf": [
{
"$ref": "#/definitions/InstanceType"
},
{
"type": "array",
"items": {
"$ref": "#/definitions/InstanceType"
}
}
]
},
"InstanceType": {
"description": "The possible types of values in JSON Schema documents.\n\nSee [JSON Schema 4.2.1. Instance Data Model](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-4.2.1).",
"type": "string",
"enum": [
"null",
"boolean",
"object",
"array",
"number",
"string",
"integer"
]
},
"SingleOrVec_for_Schema": {
"description": "A type which can be serialized as a single item, or multiple items.\n\nIn some contexts, a `Single` may be semantically distinct from a `Vec` containing only item.",
"anyOf": [
{
"$ref": "#/definitions/Schema"
},
{
"type": "array",
"items": {
"$ref": "#/definitions/Schema"
}
}
]
}
}
}

View File

@@ -0,0 +1,14 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "const-generics-z-42",
"type": "object",
"required": [
"foo"
],
"properties": {
"foo": {
"type": "integer",
"format": "int32"
}
}
}

View File

@@ -0,0 +1,47 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "a-new-name-Array_of_String-int32-int32",
"type": "object",
"required": [
"inner",
"t",
"u",
"v",
"w"
],
"properties": {
"t": {
"type": "integer",
"format": "int32"
},
"u": {
"type": "null"
},
"v": {
"type": "boolean"
},
"w": {
"type": "array",
"items": {
"type": "string"
}
},
"inner": {
"$ref": "#/definitions/another-new-name"
}
},
"definitions": {
"another-new-name": {
"type": "object",
"required": [
"foo"
],
"properties": {
"foo": {
"type": "integer",
"format": "int32"
}
}
}
}
}

View File

@@ -0,0 +1,47 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "MyStruct_for_int32_and_Null_and_Boolean_and_Array_of_String",
"type": "object",
"required": [
"inner",
"t",
"u",
"v",
"w"
],
"properties": {
"t": {
"type": "integer",
"format": "int32"
},
"u": {
"type": "null"
},
"v": {
"type": "boolean"
},
"w": {
"type": "array",
"items": {
"type": "string"
}
},
"inner": {
"$ref": "#/definitions/MySimpleStruct"
}
},
"definitions": {
"MySimpleStruct": {
"type": "object",
"required": [
"foo"
],
"properties": {
"foo": {
"type": "integer",
"format": "int32"
}
}
}
}
}

View File

@@ -0,0 +1,63 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "MixedGenericStruct_for_MyStruct_for_int32_and_Null_and_Boolean_and_Array_of_String_and_42_and_z",
"type": "object",
"required": [
"foo",
"generic"
],
"properties": {
"foo": {
"type": "integer",
"format": "int32"
},
"generic": {
"$ref": "#/definitions/MyStruct_for_int32_and_Null_and_Boolean_and_Array_of_String"
}
},
"definitions": {
"MySimpleStruct": {
"type": "object",
"required": [
"foo"
],
"properties": {
"foo": {
"type": "integer",
"format": "int32"
}
}
},
"MyStruct_for_int32_and_Null_and_Boolean_and_Array_of_String": {
"type": "object",
"required": [
"inner",
"t",
"u",
"v",
"w"
],
"properties": {
"inner": {
"$ref": "#/definitions/MySimpleStruct"
},
"t": {
"type": "integer",
"format": "int32"
},
"u": {
"type": "null"
},
"v": {
"type": "boolean"
},
"w": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}

View File

@@ -0,0 +1,636 @@
{
"$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema",
"title": "RootSchema",
"description": "The root object of a JSON Schema document.",
"type": "object",
"properties": {
"$schema": {
"description": "The `$schema` keyword.\n\nSee [JSON Schema 8.1.1. The \"$schema\" Keyword](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-8.1.1).",
"type": "string",
"nullable": true
},
"definitions": {
"description": "The `definitions` keyword.\n\nIn JSON Schema draft 2019-09 this was replaced by $defs, but in Schemars this is still serialized as `definitions` for backward-compatibility.\n\nSee [JSON Schema 8.2.5. Schema Re-Use With \"$defs\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-8.2.5), and [JSON Schema (draft 07) 9. Schema Re-Use With \"definitions\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-9).",
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/Schema"
}
},
"type": {
"description": "The `type` keyword.\n\nSee [JSON Schema Validation 6.1.1. \"type\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.1.1) and [JSON Schema 4.2.1. Instance Data Model](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-4.2.1).",
"allOf": [
{
"$ref": "#/components/schemas/SingleOrVec_for_InstanceType"
}
],
"nullable": true
},
"format": {
"description": "The `format` keyword.\n\nSee [JSON Schema Validation 7. A Vocabulary for Semantic Content With \"format\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-7).",
"type": "string",
"nullable": true
},
"enum": {
"description": "The `enum` keyword.\n\nSee [JSON Schema Validation 6.1.2. \"enum\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.1.2)",
"type": "array",
"items": {},
"nullable": true
},
"const": {
"description": "The `const` keyword.\n\nSee [JSON Schema Validation 6.1.3. \"const\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.1.3)",
"nullable": true
},
"$ref": {
"description": "The `$ref` keyword.\n\nSee [JSON Schema 8.2.4.1. Direct References with \"$ref\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-8.2.4.1).",
"type": "string",
"nullable": true
},
"$id": {
"description": "The `$id` keyword.\n\nSee [JSON Schema 8.2.2. The \"$id\" Keyword](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-8.2.2).",
"type": "string",
"nullable": true
},
"title": {
"description": "The `title` keyword.\n\nSee [JSON Schema Validation 9.1. \"title\" and \"description\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.1).",
"type": "string",
"nullable": true
},
"description": {
"description": "The `description` keyword.\n\nSee [JSON Schema Validation 9.1. \"title\" and \"description\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.1).",
"type": "string",
"nullable": true
},
"default": {
"description": "The `default` keyword.\n\nSee [JSON Schema Validation 9.2. \"default\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.2).",
"nullable": true
},
"deprecated": {
"description": "The `deprecated` keyword.\n\nSee [JSON Schema Validation 9.3. \"deprecated\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.3).",
"type": "boolean"
},
"readOnly": {
"description": "The `readOnly` keyword.\n\nSee [JSON Schema Validation 9.4. \"readOnly\" and \"writeOnly\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.4).",
"type": "boolean"
},
"writeOnly": {
"description": "The `writeOnly` keyword.\n\nSee [JSON Schema Validation 9.4. \"readOnly\" and \"writeOnly\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.4).",
"type": "boolean"
},
"examples": {
"description": "The `examples` keyword.\n\nSee [JSON Schema Validation 9.5. \"examples\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.5).",
"type": "array",
"items": {}
},
"allOf": {
"description": "The `allOf` keyword.\n\nSee [JSON Schema 9.2.1.1. \"allOf\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.1.1).",
"type": "array",
"items": {
"$ref": "#/components/schemas/Schema"
},
"nullable": true
},
"anyOf": {
"description": "The `anyOf` keyword.\n\nSee [JSON Schema 9.2.1.2. \"anyOf\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.1.2).",
"type": "array",
"items": {
"$ref": "#/components/schemas/Schema"
},
"nullable": true
},
"oneOf": {
"description": "The `oneOf` keyword.\n\nSee [JSON Schema 9.2.1.3. \"oneOf\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.1.3).",
"type": "array",
"items": {
"$ref": "#/components/schemas/Schema"
},
"nullable": true
},
"not": {
"description": "The `not` keyword.\n\nSee [JSON Schema 9.2.1.4. \"not\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.1.4).",
"allOf": [
{
"$ref": "#/components/schemas/Schema"
}
],
"nullable": true
},
"if": {
"description": "The `if` keyword.\n\nSee [JSON Schema 9.2.2.1. \"if\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.2.1).",
"allOf": [
{
"$ref": "#/components/schemas/Schema"
}
],
"nullable": true
},
"then": {
"description": "The `then` keyword.\n\nSee [JSON Schema 9.2.2.2. \"then\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.2.2).",
"allOf": [
{
"$ref": "#/components/schemas/Schema"
}
],
"nullable": true
},
"else": {
"description": "The `else` keyword.\n\nSee [JSON Schema 9.2.2.3. \"else\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.2.3).",
"allOf": [
{
"$ref": "#/components/schemas/Schema"
}
],
"nullable": true
},
"multipleOf": {
"description": "The `multipleOf` keyword.\n\nSee [JSON Schema Validation 6.2.1. \"multipleOf\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.2.1).",
"type": "number",
"format": "double",
"nullable": true
},
"maximum": {
"description": "The `maximum` keyword.\n\nSee [JSON Schema Validation 6.2.2. \"maximum\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.2.2).",
"type": "number",
"format": "double",
"nullable": true
},
"exclusiveMaximum": {
"description": "The `exclusiveMaximum` keyword.\n\nSee [JSON Schema Validation 6.2.3. \"exclusiveMaximum\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.2.3).",
"type": "number",
"format": "double",
"nullable": true
},
"minimum": {
"description": "The `minimum` keyword.\n\nSee [JSON Schema Validation 6.2.4. \"minimum\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.2.4).",
"type": "number",
"format": "double",
"nullable": true
},
"exclusiveMinimum": {
"description": "The `exclusiveMinimum` keyword.\n\nSee [JSON Schema Validation 6.2.5. \"exclusiveMinimum\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.2.5).",
"type": "number",
"format": "double",
"nullable": true
},
"maxLength": {
"description": "The `maxLength` keyword.\n\nSee [JSON Schema Validation 6.3.1. \"maxLength\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.3.1).",
"type": "integer",
"format": "uint32",
"minimum": 0.0,
"nullable": true
},
"minLength": {
"description": "The `minLength` keyword.\n\nSee [JSON Schema Validation 6.3.2. \"minLength\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.3.2).",
"type": "integer",
"format": "uint32",
"minimum": 0.0,
"nullable": true
},
"pattern": {
"description": "The `pattern` keyword.\n\nSee [JSON Schema Validation 6.3.3. \"pattern\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.3.3).",
"type": "string",
"nullable": true
},
"items": {
"description": "The `items` keyword.\n\nSee [JSON Schema 9.3.1.1. \"items\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.1.1).",
"allOf": [
{
"$ref": "#/components/schemas/SingleOrVec_for_Schema"
}
],
"nullable": true
},
"additionalItems": {
"description": "The `additionalItems` keyword.\n\nSee [JSON Schema 9.3.1.2. \"additionalItems\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.1.2).",
"allOf": [
{
"$ref": "#/components/schemas/Schema"
}
],
"nullable": true
},
"maxItems": {
"description": "The `maxItems` keyword.\n\nSee [JSON Schema Validation 6.4.1. \"maxItems\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.4.1).",
"type": "integer",
"format": "uint32",
"minimum": 0.0,
"nullable": true
},
"minItems": {
"description": "The `minItems` keyword.\n\nSee [JSON Schema Validation 6.4.2. \"minItems\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.4.2).",
"type": "integer",
"format": "uint32",
"minimum": 0.0,
"nullable": true
},
"uniqueItems": {
"description": "The `uniqueItems` keyword.\n\nSee [JSON Schema Validation 6.4.3. \"uniqueItems\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.4.3).",
"type": "boolean",
"nullable": true
},
"contains": {
"description": "The `contains` keyword.\n\nSee [JSON Schema 9.3.1.4. \"contains\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.1.4).",
"allOf": [
{
"$ref": "#/components/schemas/Schema"
}
],
"nullable": true
},
"maxProperties": {
"description": "The `maxProperties` keyword.\n\nSee [JSON Schema Validation 6.5.1. \"maxProperties\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.5.1).",
"type": "integer",
"format": "uint32",
"minimum": 0.0,
"nullable": true
},
"minProperties": {
"description": "The `minProperties` keyword.\n\nSee [JSON Schema Validation 6.5.2. \"minProperties\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.5.2).",
"type": "integer",
"format": "uint32",
"minimum": 0.0,
"nullable": true
},
"required": {
"description": "The `required` keyword.\n\nSee [JSON Schema Validation 6.5.3. \"required\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.5.3).",
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true
},
"properties": {
"description": "The `properties` keyword.\n\nSee [JSON Schema 9.3.2.1. \"properties\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.2.1).",
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/Schema"
}
},
"patternProperties": {
"description": "The `patternProperties` keyword.\n\nSee [JSON Schema 9.3.2.2. \"patternProperties\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.2.2).",
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/Schema"
}
},
"additionalProperties": {
"description": "The `additionalProperties` keyword.\n\nSee [JSON Schema 9.3.2.3. \"additionalProperties\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.2.3).",
"allOf": [
{
"$ref": "#/components/schemas/Schema"
}
],
"nullable": true
},
"propertyNames": {
"description": "The `propertyNames` keyword.\n\nSee [JSON Schema 9.3.2.5. \"propertyNames\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.2.5).",
"allOf": [
{
"$ref": "#/components/schemas/Schema"
}
],
"nullable": true
}
},
"additionalProperties": true,
"definitions": {
"Schema": {
"description": "A JSON Schema.",
"anyOf": [
{
"description": "A trivial boolean JSON Schema.\n\nThe schema `true` matches everything (always passes validation), whereas the schema `false` matches nothing (always fails validation).",
"type": "boolean"
},
{
"description": "A JSON Schema object.",
"allOf": [
{
"$ref": "#/components/schemas/SchemaObject"
}
]
}
]
},
"SchemaObject": {
"description": "A JSON Schema object.",
"type": "object",
"properties": {
"type": {
"description": "The `type` keyword.\n\nSee [JSON Schema Validation 6.1.1. \"type\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.1.1) and [JSON Schema 4.2.1. Instance Data Model](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-4.2.1).",
"allOf": [
{
"$ref": "#/components/schemas/SingleOrVec_for_InstanceType"
}
],
"nullable": true
},
"format": {
"description": "The `format` keyword.\n\nSee [JSON Schema Validation 7. A Vocabulary for Semantic Content With \"format\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-7).",
"type": "string",
"nullable": true
},
"enum": {
"description": "The `enum` keyword.\n\nSee [JSON Schema Validation 6.1.2. \"enum\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.1.2)",
"type": "array",
"items": {},
"nullable": true
},
"const": {
"description": "The `const` keyword.\n\nSee [JSON Schema Validation 6.1.3. \"const\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.1.3)",
"nullable": true
},
"$ref": {
"description": "The `$ref` keyword.\n\nSee [JSON Schema 8.2.4.1. Direct References with \"$ref\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-8.2.4.1).",
"type": "string",
"nullable": true
},
"$id": {
"description": "The `$id` keyword.\n\nSee [JSON Schema 8.2.2. The \"$id\" Keyword](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-8.2.2).",
"type": "string",
"nullable": true
},
"title": {
"description": "The `title` keyword.\n\nSee [JSON Schema Validation 9.1. \"title\" and \"description\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.1).",
"type": "string",
"nullable": true
},
"description": {
"description": "The `description` keyword.\n\nSee [JSON Schema Validation 9.1. \"title\" and \"description\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.1).",
"type": "string",
"nullable": true
},
"default": {
"description": "The `default` keyword.\n\nSee [JSON Schema Validation 9.2. \"default\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.2).",
"nullable": true
},
"deprecated": {
"description": "The `deprecated` keyword.\n\nSee [JSON Schema Validation 9.3. \"deprecated\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.3).",
"type": "boolean"
},
"readOnly": {
"description": "The `readOnly` keyword.\n\nSee [JSON Schema Validation 9.4. \"readOnly\" and \"writeOnly\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.4).",
"type": "boolean"
},
"writeOnly": {
"description": "The `writeOnly` keyword.\n\nSee [JSON Schema Validation 9.4. \"readOnly\" and \"writeOnly\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.4).",
"type": "boolean"
},
"examples": {
"description": "The `examples` keyword.\n\nSee [JSON Schema Validation 9.5. \"examples\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.5).",
"type": "array",
"items": {}
},
"allOf": {
"description": "The `allOf` keyword.\n\nSee [JSON Schema 9.2.1.1. \"allOf\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.1.1).",
"type": "array",
"items": {
"$ref": "#/components/schemas/Schema"
},
"nullable": true
},
"anyOf": {
"description": "The `anyOf` keyword.\n\nSee [JSON Schema 9.2.1.2. \"anyOf\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.1.2).",
"type": "array",
"items": {
"$ref": "#/components/schemas/Schema"
},
"nullable": true
},
"oneOf": {
"description": "The `oneOf` keyword.\n\nSee [JSON Schema 9.2.1.3. \"oneOf\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.1.3).",
"type": "array",
"items": {
"$ref": "#/components/schemas/Schema"
},
"nullable": true
},
"not": {
"description": "The `not` keyword.\n\nSee [JSON Schema 9.2.1.4. \"not\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.1.4).",
"allOf": [
{
"$ref": "#/components/schemas/Schema"
}
],
"nullable": true
},
"if": {
"description": "The `if` keyword.\n\nSee [JSON Schema 9.2.2.1. \"if\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.2.1).",
"allOf": [
{
"$ref": "#/components/schemas/Schema"
}
],
"nullable": true
},
"then": {
"description": "The `then` keyword.\n\nSee [JSON Schema 9.2.2.2. \"then\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.2.2).",
"allOf": [
{
"$ref": "#/components/schemas/Schema"
}
],
"nullable": true
},
"else": {
"description": "The `else` keyword.\n\nSee [JSON Schema 9.2.2.3. \"else\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.2.3).",
"allOf": [
{
"$ref": "#/components/schemas/Schema"
}
],
"nullable": true
},
"multipleOf": {
"description": "The `multipleOf` keyword.\n\nSee [JSON Schema Validation 6.2.1. \"multipleOf\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.2.1).",
"type": "number",
"format": "double",
"nullable": true
},
"maximum": {
"description": "The `maximum` keyword.\n\nSee [JSON Schema Validation 6.2.2. \"maximum\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.2.2).",
"type": "number",
"format": "double",
"nullable": true
},
"exclusiveMaximum": {
"description": "The `exclusiveMaximum` keyword.\n\nSee [JSON Schema Validation 6.2.3. \"exclusiveMaximum\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.2.3).",
"type": "number",
"format": "double",
"nullable": true
},
"minimum": {
"description": "The `minimum` keyword.\n\nSee [JSON Schema Validation 6.2.4. \"minimum\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.2.4).",
"type": "number",
"format": "double",
"nullable": true
},
"exclusiveMinimum": {
"description": "The `exclusiveMinimum` keyword.\n\nSee [JSON Schema Validation 6.2.5. \"exclusiveMinimum\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.2.5).",
"type": "number",
"format": "double",
"nullable": true
},
"maxLength": {
"description": "The `maxLength` keyword.\n\nSee [JSON Schema Validation 6.3.1. \"maxLength\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.3.1).",
"type": "integer",
"format": "uint32",
"minimum": 0.0,
"nullable": true
},
"minLength": {
"description": "The `minLength` keyword.\n\nSee [JSON Schema Validation 6.3.2. \"minLength\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.3.2).",
"type": "integer",
"format": "uint32",
"minimum": 0.0,
"nullable": true
},
"pattern": {
"description": "The `pattern` keyword.\n\nSee [JSON Schema Validation 6.3.3. \"pattern\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.3.3).",
"type": "string",
"nullable": true
},
"items": {
"description": "The `items` keyword.\n\nSee [JSON Schema 9.3.1.1. \"items\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.1.1).",
"allOf": [
{
"$ref": "#/components/schemas/SingleOrVec_for_Schema"
}
],
"nullable": true
},
"additionalItems": {
"description": "The `additionalItems` keyword.\n\nSee [JSON Schema 9.3.1.2. \"additionalItems\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.1.2).",
"allOf": [
{
"$ref": "#/components/schemas/Schema"
}
],
"nullable": true
},
"maxItems": {
"description": "The `maxItems` keyword.\n\nSee [JSON Schema Validation 6.4.1. \"maxItems\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.4.1).",
"type": "integer",
"format": "uint32",
"minimum": 0.0,
"nullable": true
},
"minItems": {
"description": "The `minItems` keyword.\n\nSee [JSON Schema Validation 6.4.2. \"minItems\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.4.2).",
"type": "integer",
"format": "uint32",
"minimum": 0.0,
"nullable": true
},
"uniqueItems": {
"description": "The `uniqueItems` keyword.\n\nSee [JSON Schema Validation 6.4.3. \"uniqueItems\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.4.3).",
"type": "boolean",
"nullable": true
},
"contains": {
"description": "The `contains` keyword.\n\nSee [JSON Schema 9.3.1.4. \"contains\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.1.4).",
"allOf": [
{
"$ref": "#/components/schemas/Schema"
}
],
"nullable": true
},
"maxProperties": {
"description": "The `maxProperties` keyword.\n\nSee [JSON Schema Validation 6.5.1. \"maxProperties\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.5.1).",
"type": "integer",
"format": "uint32",
"minimum": 0.0,
"nullable": true
},
"minProperties": {
"description": "The `minProperties` keyword.\n\nSee [JSON Schema Validation 6.5.2. \"minProperties\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.5.2).",
"type": "integer",
"format": "uint32",
"minimum": 0.0,
"nullable": true
},
"required": {
"description": "The `required` keyword.\n\nSee [JSON Schema Validation 6.5.3. \"required\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.5.3).",
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true
},
"properties": {
"description": "The `properties` keyword.\n\nSee [JSON Schema 9.3.2.1. \"properties\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.2.1).",
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/Schema"
}
},
"patternProperties": {
"description": "The `patternProperties` keyword.\n\nSee [JSON Schema 9.3.2.2. \"patternProperties\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.2.2).",
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/Schema"
}
},
"additionalProperties": {
"description": "The `additionalProperties` keyword.\n\nSee [JSON Schema 9.3.2.3. \"additionalProperties\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.2.3).",
"allOf": [
{
"$ref": "#/components/schemas/Schema"
}
],
"nullable": true
},
"propertyNames": {
"description": "The `propertyNames` keyword.\n\nSee [JSON Schema 9.3.2.5. \"propertyNames\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.2.5).",
"allOf": [
{
"$ref": "#/components/schemas/Schema"
}
],
"nullable": true
}
},
"additionalProperties": true
},
"SingleOrVec_for_InstanceType": {
"description": "A type which can be serialized as a single item, or multiple items.\n\nIn some contexts, a `Single` may be semantically distinct from a `Vec` containing only item.",
"anyOf": [
{
"$ref": "#/components/schemas/InstanceType"
},
{
"type": "array",
"items": {
"$ref": "#/components/schemas/InstanceType"
}
}
]
},
"InstanceType": {
"description": "The possible types of values in JSON Schema documents.\n\nSee [JSON Schema 4.2.1. Instance Data Model](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-4.2.1).",
"type": "string",
"enum": [
"null",
"boolean",
"object",
"array",
"number",
"string",
"integer"
]
},
"SingleOrVec_for_Schema": {
"description": "A type which can be serialized as a single item, or multiple items.\n\nIn some contexts, a `Single` may be semantically distinct from a `Vec` containing only item.",
"anyOf": [
{
"$ref": "#/components/schemas/Schema"
},
{
"type": "array",
"items": {
"$ref": "#/components/schemas/Schema"
}
}
]
}
}
}

View File

@@ -0,0 +1,762 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "RootSchema",
"description": "The root object of a JSON Schema document.",
"type": "object",
"properties": {
"$schema": {
"description": "The `$schema` keyword.\n\nSee [JSON Schema 8.1.1. The \"$schema\" Keyword](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-8.1.1).",
"type": [
"string",
"null"
]
},
"definitions": {
"description": "The `definitions` keyword.\n\nIn JSON Schema draft 2019-09 this was replaced by $defs, but in Schemars this is still serialized as `definitions` for backward-compatibility.\n\nSee [JSON Schema 8.2.5. Schema Re-Use With \"$defs\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-8.2.5), and [JSON Schema (draft 07) 9. Schema Re-Use With \"definitions\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-9).",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/Schema"
}
},
"type": {
"description": "The `type` keyword.\n\nSee [JSON Schema Validation 6.1.1. \"type\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.1.1) and [JSON Schema 4.2.1. Instance Data Model](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-4.2.1).",
"anyOf": [
{
"$ref": "#/definitions/SingleOrVec_for_InstanceType"
},
{
"type": "null"
}
]
},
"format": {
"description": "The `format` keyword.\n\nSee [JSON Schema Validation 7. A Vocabulary for Semantic Content With \"format\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-7).",
"type": [
"string",
"null"
]
},
"enum": {
"description": "The `enum` keyword.\n\nSee [JSON Schema Validation 6.1.2. \"enum\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.1.2)",
"type": [
"array",
"null"
],
"items": true
},
"const": {
"description": "The `const` keyword.\n\nSee [JSON Schema Validation 6.1.3. \"const\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.1.3)"
},
"$ref": {
"description": "The `$ref` keyword.\n\nSee [JSON Schema 8.2.4.1. Direct References with \"$ref\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-8.2.4.1).",
"type": [
"string",
"null"
]
},
"$id": {
"description": "The `$id` keyword.\n\nSee [JSON Schema 8.2.2. The \"$id\" Keyword](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-8.2.2).",
"type": [
"string",
"null"
]
},
"title": {
"description": "The `title` keyword.\n\nSee [JSON Schema Validation 9.1. \"title\" and \"description\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.1).",
"type": [
"string",
"null"
]
},
"description": {
"description": "The `description` keyword.\n\nSee [JSON Schema Validation 9.1. \"title\" and \"description\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.1).",
"type": [
"string",
"null"
]
},
"default": {
"description": "The `default` keyword.\n\nSee [JSON Schema Validation 9.2. \"default\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.2)."
},
"deprecated": {
"description": "The `deprecated` keyword.\n\nSee [JSON Schema Validation 9.3. \"deprecated\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.3).",
"type": "boolean"
},
"readOnly": {
"description": "The `readOnly` keyword.\n\nSee [JSON Schema Validation 9.4. \"readOnly\" and \"writeOnly\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.4).",
"type": "boolean"
},
"writeOnly": {
"description": "The `writeOnly` keyword.\n\nSee [JSON Schema Validation 9.4. \"readOnly\" and \"writeOnly\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.4).",
"type": "boolean"
},
"examples": {
"description": "The `examples` keyword.\n\nSee [JSON Schema Validation 9.5. \"examples\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.5).",
"type": "array",
"items": true
},
"allOf": {
"description": "The `allOf` keyword.\n\nSee [JSON Schema 9.2.1.1. \"allOf\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.1.1).",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/Schema"
}
},
"anyOf": {
"description": "The `anyOf` keyword.\n\nSee [JSON Schema 9.2.1.2. \"anyOf\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.1.2).",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/Schema"
}
},
"oneOf": {
"description": "The `oneOf` keyword.\n\nSee [JSON Schema 9.2.1.3. \"oneOf\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.1.3).",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/Schema"
}
},
"not": {
"description": "The `not` keyword.\n\nSee [JSON Schema 9.2.1.4. \"not\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.1.4).",
"anyOf": [
{
"$ref": "#/definitions/Schema"
},
{
"type": "null"
}
]
},
"if": {
"description": "The `if` keyword.\n\nSee [JSON Schema 9.2.2.1. \"if\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.2.1).",
"anyOf": [
{
"$ref": "#/definitions/Schema"
},
{
"type": "null"
}
]
},
"then": {
"description": "The `then` keyword.\n\nSee [JSON Schema 9.2.2.2. \"then\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.2.2).",
"anyOf": [
{
"$ref": "#/definitions/Schema"
},
{
"type": "null"
}
]
},
"else": {
"description": "The `else` keyword.\n\nSee [JSON Schema 9.2.2.3. \"else\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.2.3).",
"anyOf": [
{
"$ref": "#/definitions/Schema"
},
{
"type": "null"
}
]
},
"multipleOf": {
"description": "The `multipleOf` keyword.\n\nSee [JSON Schema Validation 6.2.1. \"multipleOf\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.2.1).",
"type": [
"number",
"null"
],
"format": "double"
},
"maximum": {
"description": "The `maximum` keyword.\n\nSee [JSON Schema Validation 6.2.2. \"maximum\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.2.2).",
"type": [
"number",
"null"
],
"format": "double"
},
"exclusiveMaximum": {
"description": "The `exclusiveMaximum` keyword.\n\nSee [JSON Schema Validation 6.2.3. \"exclusiveMaximum\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.2.3).",
"type": [
"number",
"null"
],
"format": "double"
},
"minimum": {
"description": "The `minimum` keyword.\n\nSee [JSON Schema Validation 6.2.4. \"minimum\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.2.4).",
"type": [
"number",
"null"
],
"format": "double"
},
"exclusiveMinimum": {
"description": "The `exclusiveMinimum` keyword.\n\nSee [JSON Schema Validation 6.2.5. \"exclusiveMinimum\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.2.5).",
"type": [
"number",
"null"
],
"format": "double"
},
"maxLength": {
"description": "The `maxLength` keyword.\n\nSee [JSON Schema Validation 6.3.1. \"maxLength\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.3.1).",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0.0
},
"minLength": {
"description": "The `minLength` keyword.\n\nSee [JSON Schema Validation 6.3.2. \"minLength\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.3.2).",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0.0
},
"pattern": {
"description": "The `pattern` keyword.\n\nSee [JSON Schema Validation 6.3.3. \"pattern\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.3.3).",
"type": [
"string",
"null"
]
},
"items": {
"description": "The `items` keyword.\n\nSee [JSON Schema 9.3.1.1. \"items\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.1.1).",
"anyOf": [
{
"$ref": "#/definitions/SingleOrVec_for_Schema"
},
{
"type": "null"
}
]
},
"additionalItems": {
"description": "The `additionalItems` keyword.\n\nSee [JSON Schema 9.3.1.2. \"additionalItems\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.1.2).",
"anyOf": [
{
"$ref": "#/definitions/Schema"
},
{
"type": "null"
}
]
},
"maxItems": {
"description": "The `maxItems` keyword.\n\nSee [JSON Schema Validation 6.4.1. \"maxItems\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.4.1).",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0.0
},
"minItems": {
"description": "The `minItems` keyword.\n\nSee [JSON Schema Validation 6.4.2. \"minItems\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.4.2).",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0.0
},
"uniqueItems": {
"description": "The `uniqueItems` keyword.\n\nSee [JSON Schema Validation 6.4.3. \"uniqueItems\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.4.3).",
"type": [
"boolean",
"null"
]
},
"contains": {
"description": "The `contains` keyword.\n\nSee [JSON Schema 9.3.1.4. \"contains\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.1.4).",
"anyOf": [
{
"$ref": "#/definitions/Schema"
},
{
"type": "null"
}
]
},
"maxProperties": {
"description": "The `maxProperties` keyword.\n\nSee [JSON Schema Validation 6.5.1. \"maxProperties\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.5.1).",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0.0
},
"minProperties": {
"description": "The `minProperties` keyword.\n\nSee [JSON Schema Validation 6.5.2. \"minProperties\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.5.2).",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0.0
},
"required": {
"description": "The `required` keyword.\n\nSee [JSON Schema Validation 6.5.3. \"required\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.5.3).",
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true
},
"properties": {
"description": "The `properties` keyword.\n\nSee [JSON Schema 9.3.2.1. \"properties\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.2.1).",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/Schema"
}
},
"patternProperties": {
"description": "The `patternProperties` keyword.\n\nSee [JSON Schema 9.3.2.2. \"patternProperties\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.2.2).",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/Schema"
}
},
"additionalProperties": {
"description": "The `additionalProperties` keyword.\n\nSee [JSON Schema 9.3.2.3. \"additionalProperties\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.2.3).",
"anyOf": [
{
"$ref": "#/definitions/Schema"
},
{
"type": "null"
}
]
},
"propertyNames": {
"description": "The `propertyNames` keyword.\n\nSee [JSON Schema 9.3.2.5. \"propertyNames\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.2.5).",
"anyOf": [
{
"$ref": "#/definitions/Schema"
},
{
"type": "null"
}
]
}
},
"additionalProperties": true,
"definitions": {
"Schema": {
"description": "A JSON Schema.",
"anyOf": [
{
"description": "A trivial boolean JSON Schema.\n\nThe schema `true` matches everything (always passes validation), whereas the schema `false` matches nothing (always fails validation).",
"type": "boolean"
},
{
"description": "A JSON Schema object.",
"allOf": [
{
"$ref": "#/definitions/SchemaObject"
}
]
}
]
},
"SchemaObject": {
"description": "A JSON Schema object.",
"type": "object",
"properties": {
"type": {
"description": "The `type` keyword.\n\nSee [JSON Schema Validation 6.1.1. \"type\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.1.1) and [JSON Schema 4.2.1. Instance Data Model](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-4.2.1).",
"anyOf": [
{
"$ref": "#/definitions/SingleOrVec_for_InstanceType"
},
{
"type": "null"
}
]
},
"format": {
"description": "The `format` keyword.\n\nSee [JSON Schema Validation 7. A Vocabulary for Semantic Content With \"format\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-7).",
"type": [
"string",
"null"
]
},
"enum": {
"description": "The `enum` keyword.\n\nSee [JSON Schema Validation 6.1.2. \"enum\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.1.2)",
"type": [
"array",
"null"
],
"items": true
},
"const": {
"description": "The `const` keyword.\n\nSee [JSON Schema Validation 6.1.3. \"const\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.1.3)"
},
"$ref": {
"description": "The `$ref` keyword.\n\nSee [JSON Schema 8.2.4.1. Direct References with \"$ref\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-8.2.4.1).",
"type": [
"string",
"null"
]
},
"$id": {
"description": "The `$id` keyword.\n\nSee [JSON Schema 8.2.2. The \"$id\" Keyword](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-8.2.2).",
"type": [
"string",
"null"
]
},
"title": {
"description": "The `title` keyword.\n\nSee [JSON Schema Validation 9.1. \"title\" and \"description\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.1).",
"type": [
"string",
"null"
]
},
"description": {
"description": "The `description` keyword.\n\nSee [JSON Schema Validation 9.1. \"title\" and \"description\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.1).",
"type": [
"string",
"null"
]
},
"default": {
"description": "The `default` keyword.\n\nSee [JSON Schema Validation 9.2. \"default\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.2)."
},
"deprecated": {
"description": "The `deprecated` keyword.\n\nSee [JSON Schema Validation 9.3. \"deprecated\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.3).",
"type": "boolean"
},
"readOnly": {
"description": "The `readOnly` keyword.\n\nSee [JSON Schema Validation 9.4. \"readOnly\" and \"writeOnly\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.4).",
"type": "boolean"
},
"writeOnly": {
"description": "The `writeOnly` keyword.\n\nSee [JSON Schema Validation 9.4. \"readOnly\" and \"writeOnly\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.4).",
"type": "boolean"
},
"examples": {
"description": "The `examples` keyword.\n\nSee [JSON Schema Validation 9.5. \"examples\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-9.5).",
"type": "array",
"items": true
},
"allOf": {
"description": "The `allOf` keyword.\n\nSee [JSON Schema 9.2.1.1. \"allOf\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.1.1).",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/Schema"
}
},
"anyOf": {
"description": "The `anyOf` keyword.\n\nSee [JSON Schema 9.2.1.2. \"anyOf\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.1.2).",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/Schema"
}
},
"oneOf": {
"description": "The `oneOf` keyword.\n\nSee [JSON Schema 9.2.1.3. \"oneOf\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.1.3).",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/Schema"
}
},
"not": {
"description": "The `not` keyword.\n\nSee [JSON Schema 9.2.1.4. \"not\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.1.4).",
"anyOf": [
{
"$ref": "#/definitions/Schema"
},
{
"type": "null"
}
]
},
"if": {
"description": "The `if` keyword.\n\nSee [JSON Schema 9.2.2.1. \"if\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.2.1).",
"anyOf": [
{
"$ref": "#/definitions/Schema"
},
{
"type": "null"
}
]
},
"then": {
"description": "The `then` keyword.\n\nSee [JSON Schema 9.2.2.2. \"then\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.2.2).",
"anyOf": [
{
"$ref": "#/definitions/Schema"
},
{
"type": "null"
}
]
},
"else": {
"description": "The `else` keyword.\n\nSee [JSON Schema 9.2.2.3. \"else\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.2.2.3).",
"anyOf": [
{
"$ref": "#/definitions/Schema"
},
{
"type": "null"
}
]
},
"multipleOf": {
"description": "The `multipleOf` keyword.\n\nSee [JSON Schema Validation 6.2.1. \"multipleOf\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.2.1).",
"type": [
"number",
"null"
],
"format": "double"
},
"maximum": {
"description": "The `maximum` keyword.\n\nSee [JSON Schema Validation 6.2.2. \"maximum\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.2.2).",
"type": [
"number",
"null"
],
"format": "double"
},
"exclusiveMaximum": {
"description": "The `exclusiveMaximum` keyword.\n\nSee [JSON Schema Validation 6.2.3. \"exclusiveMaximum\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.2.3).",
"type": [
"number",
"null"
],
"format": "double"
},
"minimum": {
"description": "The `minimum` keyword.\n\nSee [JSON Schema Validation 6.2.4. \"minimum\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.2.4).",
"type": [
"number",
"null"
],
"format": "double"
},
"exclusiveMinimum": {
"description": "The `exclusiveMinimum` keyword.\n\nSee [JSON Schema Validation 6.2.5. \"exclusiveMinimum\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.2.5).",
"type": [
"number",
"null"
],
"format": "double"
},
"maxLength": {
"description": "The `maxLength` keyword.\n\nSee [JSON Schema Validation 6.3.1. \"maxLength\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.3.1).",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0.0
},
"minLength": {
"description": "The `minLength` keyword.\n\nSee [JSON Schema Validation 6.3.2. \"minLength\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.3.2).",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0.0
},
"pattern": {
"description": "The `pattern` keyword.\n\nSee [JSON Schema Validation 6.3.3. \"pattern\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.3.3).",
"type": [
"string",
"null"
]
},
"items": {
"description": "The `items` keyword.\n\nSee [JSON Schema 9.3.1.1. \"items\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.1.1).",
"anyOf": [
{
"$ref": "#/definitions/SingleOrVec_for_Schema"
},
{
"type": "null"
}
]
},
"additionalItems": {
"description": "The `additionalItems` keyword.\n\nSee [JSON Schema 9.3.1.2. \"additionalItems\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.1.2).",
"anyOf": [
{
"$ref": "#/definitions/Schema"
},
{
"type": "null"
}
]
},
"maxItems": {
"description": "The `maxItems` keyword.\n\nSee [JSON Schema Validation 6.4.1. \"maxItems\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.4.1).",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0.0
},
"minItems": {
"description": "The `minItems` keyword.\n\nSee [JSON Schema Validation 6.4.2. \"minItems\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.4.2).",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0.0
},
"uniqueItems": {
"description": "The `uniqueItems` keyword.\n\nSee [JSON Schema Validation 6.4.3. \"uniqueItems\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.4.3).",
"type": [
"boolean",
"null"
]
},
"contains": {
"description": "The `contains` keyword.\n\nSee [JSON Schema 9.3.1.4. \"contains\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.1.4).",
"anyOf": [
{
"$ref": "#/definitions/Schema"
},
{
"type": "null"
}
]
},
"maxProperties": {
"description": "The `maxProperties` keyword.\n\nSee [JSON Schema Validation 6.5.1. \"maxProperties\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.5.1).",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0.0
},
"minProperties": {
"description": "The `minProperties` keyword.\n\nSee [JSON Schema Validation 6.5.2. \"minProperties\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.5.2).",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0.0
},
"required": {
"description": "The `required` keyword.\n\nSee [JSON Schema Validation 6.5.3. \"required\"](https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.5.3).",
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true
},
"properties": {
"description": "The `properties` keyword.\n\nSee [JSON Schema 9.3.2.1. \"properties\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.2.1).",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/Schema"
}
},
"patternProperties": {
"description": "The `patternProperties` keyword.\n\nSee [JSON Schema 9.3.2.2. \"patternProperties\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.2.2).",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/Schema"
}
},
"additionalProperties": {
"description": "The `additionalProperties` keyword.\n\nSee [JSON Schema 9.3.2.3. \"additionalProperties\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.2.3).",
"anyOf": [
{
"$ref": "#/definitions/Schema"
},
{
"type": "null"
}
]
},
"propertyNames": {
"description": "The `propertyNames` keyword.\n\nSee [JSON Schema 9.3.2.5. \"propertyNames\"](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-9.3.2.5).",
"anyOf": [
{
"$ref": "#/definitions/Schema"
},
{
"type": "null"
}
]
}
},
"additionalProperties": true
},
"SingleOrVec_for_InstanceType": {
"description": "A type which can be serialized as a single item, or multiple items.\n\nIn some contexts, a `Single` may be semantically distinct from a `Vec` containing only item.",
"anyOf": [
{
"$ref": "#/definitions/InstanceType"
},
{
"type": "array",
"items": {
"$ref": "#/definitions/InstanceType"
}
}
]
},
"InstanceType": {
"description": "The possible types of values in JSON Schema documents.\n\nSee [JSON Schema 4.2.1. Instance Data Model](https://tools.ietf.org/html/draft-handrews-json-schema-02#section-4.2.1).",
"type": "string",
"enum": [
"null",
"boolean",
"object",
"array",
"number",
"string",
"integer"
]
},
"SingleOrVec_for_Schema": {
"description": "A type which can be serialized as a single item, or multiple items.\n\nIn some contexts, a `Single` may be semantically distinct from a `Vec` containing only item.",
"anyOf": [
{
"$ref": "#/definitions/Schema"
},
{
"type": "array",
"items": {
"$ref": "#/definitions/Schema"
}
}
]
}
}
}

View File

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

View File

@@ -0,0 +1,60 @@
{
"$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema",
"title": "Outer",
"type": "object",
"required": [
"int",
"value",
"values"
],
"properties": {
"int": {
"type": "integer",
"format": "int32",
"example": 8
},
"values": {
"type": "object",
"additionalProperties": true
},
"value": {},
"inner": {
"allOf": [
{
"$ref": "#/components/schemas/Inner"
}
],
"nullable": true
}
},
"definitions": {
"Inner": {
"oneOf": [
{
"type": "string",
"enum": [
"UndocumentedUnit1",
"UndocumentedUnit2"
]
},
{
"description": "This is a documented unit variant",
"type": "string",
"enum": [
"DocumentedUnit"
]
},
{
"type": "object",
"required": [
"ValueNewType"
],
"properties": {
"ValueNewType": {}
},
"additionalProperties": false
}
]
}
}
}

View File

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

View File

@@ -0,0 +1,97 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Adjacent",
"oneOf": [
{
"type": "object",
"required": [
"c",
"t"
],
"properties": {
"c": {
"type": "object",
"required": [
"foo"
],
"properties": {
"foo": {
"type": "boolean"
}
}
},
"t": {
"type": "string",
"enum": [
"Struct"
]
}
}
},
{
"type": "object",
"required": [
"c",
"t"
],
"properties": {
"c": {
"type": "boolean"
},
"t": {
"type": "string",
"enum": [
"NewType"
]
}
}
},
{
"type": "object",
"required": [
"c",
"t"
],
"properties": {
"c": {
"type": "array",
"items": [
{
"type": "boolean"
},
{
"type": "integer",
"format": "int32"
}
],
"maxItems": 2,
"minItems": 2
},
"t": {
"type": "string",
"enum": [
"Tuple"
]
}
}
},
{
"type": "object",
"required": [
"c",
"t"
],
"properties": {
"c": {
"type": "boolean"
},
"t": {
"type": "string",
"enum": [
"Unit"
]
}
}
}
]
}

View File

@@ -0,0 +1,73 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "External",
"oneOf": [
{
"type": "object",
"required": [
"struct"
],
"properties": {
"struct": {
"type": "object",
"required": [
"foo"
],
"properties": {
"foo": {
"type": "boolean"
}
}
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"newType"
],
"properties": {
"newType": {
"type": "boolean"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"tuple"
],
"properties": {
"tuple": {
"type": "array",
"items": [
{
"type": "boolean"
},
{
"type": "integer",
"format": "int32"
}
],
"maxItems": 2,
"minItems": 2
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"unit"
],
"properties": {
"unit": {
"type": "boolean"
}
},
"additionalProperties": false
}
]
}

View File

@@ -0,0 +1,58 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Internal",
"oneOf": [
{
"type": "object",
"required": [
"foo",
"typeProperty"
],
"properties": {
"foo": {
"type": "boolean"
},
"typeProperty": {
"type": "string",
"enum": [
"Struct"
]
}
}
},
{
"type": [
"boolean",
"object"
],
"required": [
"typeProperty"
],
"properties": {
"typeProperty": {
"type": "string",
"enum": [
"NewType"
]
}
}
},
{
"type": [
"boolean",
"object"
],
"required": [
"typeProperty"
],
"properties": {
"typeProperty": {
"type": "string",
"enum": [
"Unit"
]
}
}
}
]
}

View File

@@ -0,0 +1,37 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Untagged",
"anyOf": [
{
"type": "object",
"required": [
"foo"
],
"properties": {
"foo": {
"type": "boolean"
}
}
},
{
"type": "boolean"
},
{
"type": "array",
"items": [
{
"type": "boolean"
},
{
"type": "integer",
"format": "int32"
}
],
"maxItems": 2,
"minItems": 2
},
{
"type": "boolean"
}
]
}

View File

@@ -0,0 +1,5 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Newtype",
"type": "boolean"
}

View File

@@ -0,0 +1,22 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Struct",
"type": "object",
"required": [
"bar",
"baz",
"foo"
],
"properties": {
"foo": {
"type": "boolean"
},
"bar": {
"type": "integer",
"format": "int32"
},
"baz": {
"type": "boolean"
}
}
}

View File

@@ -0,0 +1,5 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "schema_fn",
"type": "boolean"
}

View File

@@ -0,0 +1,19 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Tuple",
"type": "array",
"items": [
{
"type": "boolean"
},
{
"type": "integer",
"format": "int32"
},
{
"type": "boolean"
}
],
"maxItems": 3,
"minItems": 3
}

View File

@@ -0,0 +1,12 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "SemverTypes",
"type": "object",
"required": ["version"],
"properties": {
"version": {
"type": "string",
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$"
}
}
}

View File

@@ -0,0 +1,25 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "MyEnum",
"oneOf": [
{
"type": "string",
"enum": [
"Included2"
]
},
{
"type": "object",
"required": [
"Included1"
],
"properties": {
"Included1": {
"type": "number",
"format": "float"
}
},
"additionalProperties": false
}
]
}

View File

@@ -0,0 +1,24 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "MyStruct",
"type": "object",
"required": [
"included",
"writable"
],
"properties": {
"readable": {
"default": "",
"readOnly": true,
"type": "string"
},
"writable": {
"writeOnly": true,
"type": "number",
"format": "float"
},
"included": {
"type": "null"
}
}
}

View File

@@ -0,0 +1,16 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "TupleStruct",
"type": "array",
"items": [
{
"type": "number",
"format": "float"
},
{
"type": "null"
}
],
"maxItems": 2,
"minItems": 2
}

View File

@@ -0,0 +1,8 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Array_of_String",
"type": "array",
"items": {
"type": "string"
}
}

View File

@@ -0,0 +1,5 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "String",
"type": "string"
}

View File

@@ -0,0 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Newtype",
"type": "integer",
"format": "int32"
}

View File

@@ -0,0 +1,25 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Struct",
"type": "object",
"required": [
"bar",
"foo"
],
"properties": {
"foo": {
"type": "integer",
"format": "int32"
},
"bar": {
"type": "boolean"
},
"baz": {
"type": [
"string",
"null"
]
}
},
"additionalProperties": false
}

View File

@@ -0,0 +1,24 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Struct",
"type": "object",
"required": [
"bar",
"foo"
],
"properties": {
"foo": {
"type": "integer",
"format": "int32"
},
"bar": {
"type": "boolean"
},
"baz": {
"type": [
"string",
"null"
]
}
}
}

View File

@@ -0,0 +1,22 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Tuple",
"type": "array",
"items": [
{
"type": "integer",
"format": "int32"
},
{
"type": "boolean"
},
{
"type": [
"string",
"null"
]
}
],
"maxItems": 3,
"minItems": 3
}

View File

@@ -0,0 +1,5 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Unit",
"type": "null"
}

View File

@@ -0,0 +1,33 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "OuterStruct",
"type": "object",
"properties": {
"inner": {
"anyOf": [
{
"$ref": "#/definitions/InnerStruct"
},
{
"type": "null"
}
]
}
},
"definitions": {
"InnerStruct": {
"type": "array",
"items": [
{
"type": "string"
},
{
"type": "integer",
"format": "int32"
}
],
"maxItems": 2,
"minItems": 2
}
}
}

14
vendor/schemars/tests/expected/url.json vendored Normal file
View File

@@ -0,0 +1,14 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "UrlTypes",
"type": "object",
"required": [
"url"
],
"properties": {
"url": {
"type": "string",
"format": "uri"
}
}
}

View File

@@ -0,0 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Uuid",
"type": "string",
"format": "uuid"
}

View File

@@ -0,0 +1,104 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Struct",
"type": "object",
"required": [
"contains_str1",
"contains_str2",
"email_address",
"homepage",
"map_contains",
"min_max",
"min_max2",
"non_empty_str",
"non_empty_str2",
"pair",
"regex_str1",
"regex_str2",
"regex_str3",
"required_option",
"tel",
"x"
],
"properties": {
"min_max": {
"type": "number",
"format": "float",
"maximum": 100.0,
"minimum": 0.01
},
"min_max2": {
"type": "number",
"format": "float",
"maximum": 1000.0,
"minimum": 1.0
},
"regex_str1": {
"type": "string",
"pattern": "^[Hh]ello\\b"
},
"regex_str2": {
"type": "string",
"pattern": "^[Hh]ello\\b"
},
"regex_str3": {
"type": "string",
"pattern": "^\\d+$"
},
"contains_str1": {
"type": "string",
"pattern": "substring\\.\\.\\."
},
"contains_str2": {
"type": "string",
"pattern": "substring\\.\\.\\."
},
"email_address": {
"type": "string",
"format": "email"
},
"tel": {
"type": "string",
"format": "phone"
},
"homepage": {
"type": "string",
"format": "uri"
},
"non_empty_str": {
"type": "string",
"maxLength": 100,
"minLength": 1
},
"non_empty_str2": {
"type": "string",
"maxLength": 1000,
"minLength": 1
},
"pair": {
"type": "array",
"items": {
"type": "integer",
"format": "int32"
},
"maxItems": 2,
"minItems": 2
},
"map_contains": {
"type": "object",
"required": [
"map_key"
],
"additionalProperties": {
"type": "null"
}
},
"required_option": {
"type": "boolean"
},
"x": {
"type": "integer",
"format": "int32"
}
}
}

View File

@@ -0,0 +1,74 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Struct",
"type": "object",
"required": [
"array_str_length",
"slice_str_contains",
"vec_i32_range",
"vec_str_length",
"vec_str_length2",
"vec_str_regex",
"vec_str_url"
],
"properties": {
"array_str_length": {
"type": "array",
"items": {
"type": "string",
"maxLength": 100,
"minLength": 5
},
"maxItems": 2,
"minItems": 2
},
"slice_str_contains": {
"type": "array",
"items": {
"type": "string",
"pattern": "substring\\.\\.\\."
}
},
"vec_i32_range": {
"type": "array",
"items": {
"type": "integer",
"format": "int32",
"maximum": 10.0,
"minimum": -10.0
}
},
"vec_str_length": {
"type": "array",
"items": {
"type": "string",
"maxLength": 100,
"minLength": 1
}
},
"vec_str_length2": {
"type": "array",
"items": {
"type": "string",
"maxLength": 100,
"minLength": 1
},
"maxItems": 3,
"minItems": 1
},
"vec_str_regex": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[Hh]ello\\b"
}
},
"vec_str_url": {
"type": "array",
"items": {
"type": "string",
"format": "uri"
}
}
}
}

View File

@@ -0,0 +1,8 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "NewType",
"type": "integer",
"format": "uint8",
"maximum": 10.0,
"minimum": 0.0
}

View File

@@ -0,0 +1,104 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Struct2",
"type": "object",
"required": [
"contains_str1",
"contains_str2",
"email_address",
"homepage",
"map_contains",
"min_max",
"min_max2",
"non_empty_str",
"non_empty_str2",
"pair",
"regex_str1",
"regex_str2",
"regex_str3",
"required_option",
"tel",
"x"
],
"properties": {
"min_max": {
"type": "number",
"format": "float",
"maximum": 100.0,
"minimum": 0.01
},
"min_max2": {
"type": "number",
"format": "float",
"maximum": 1000.0,
"minimum": 1.0
},
"regex_str1": {
"type": "string",
"pattern": "^[Hh]ello\\b"
},
"regex_str2": {
"type": "string",
"pattern": "^[Hh]ello\\b"
},
"regex_str3": {
"type": "string",
"pattern": "^\\d+$"
},
"contains_str1": {
"type": "string",
"pattern": "substring\\.\\.\\."
},
"contains_str2": {
"type": "string",
"pattern": "substring\\.\\.\\."
},
"email_address": {
"type": "string",
"format": "email"
},
"tel": {
"type": "string",
"format": "phone"
},
"homepage": {
"type": "string",
"format": "uri"
},
"non_empty_str": {
"type": "string",
"maxLength": 100,
"minLength": 1
},
"non_empty_str2": {
"type": "string",
"maxLength": 1000,
"minLength": 1
},
"pair": {
"type": "array",
"items": {
"type": "integer",
"format": "int32"
},
"maxItems": 2,
"minItems": 2
},
"map_contains": {
"type": "object",
"required": [
"map_key"
],
"additionalProperties": {
"type": "null"
}
},
"required_option": {
"type": "boolean"
},
"x": {
"type": "integer",
"format": "int32"
}
}
}

View File

@@ -0,0 +1,18 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Tuple",
"type": "array",
"items": [
{
"type": "integer",
"format": "uint8",
"maximum": 10.0,
"minimum": 0.0
},
{
"type": "boolean"
}
],
"maxItems": 2,
"minItems": 2
}