-
Notifications
You must be signed in to change notification settings - Fork 0
/
jtd.schema.json
136 lines (136 loc) · 3.73 KB
/
jtd.schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
{
"oneOf": [
{
"title": "The empty form",
"description": "The empty form is meant to describe instances whose values are unknown, unpredictable, or otherwise unconstrained by the schema.",
"type": "object",
"maxProperties": 0
},
{
"title": "The ref form",
"description": "The ref form is for when a schema is defined in terms of something in the 'definitions' of the root schema.",
"type": "object",
"properties": { "ref": { "type": "string" } },
"required": ["ref"]
},
{
"title": "The type form",
"description": "The type form is meant to describe instances whose value is a boolean, number, string, or timestamp.",
"type": "object",
"properties": {
"type": {
"enum": [
"boolean",
"string",
"timestamp",
"float32",
"float64",
"int8",
"uint8",
"int16",
"uint16",
"int32",
"uint32"
]
}
},
"required": ["type"]
},
{
"title": "The enum form",
"description": "The enum form is meant to describe instances whose value must be one of a given set of string values.",
"type": "object",
"properties": {
"enum": {
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"uniqueItems": true
}
},
"required": ["enum"]
},
{
"title": "The elements form",
"description": "The elements form is meant to describe instances that must be arrays.",
"type": "object",
"properties": {
"elements": {
"type": "object",
"$ref": "#"
}
},
"required": ["elements"]
},
{
"title": "The properties form",
"description": "The properties form is meant to describe JSON objects being used as a 'struct'.",
"type": "object",
"properties": {
"properties": {
"type": "object",
"patternProperties": {
".*": {
"$ref": "#"
}
}
},
"optionalProperties": {
"title": "Optional properties",
"description": "Optional properties definition.",
"type": "object",
"patternProperties": {
".*": {
"$ref": "#"
}
}
},
"additionalProperties": {
"title": "Additional properties mode",
"description": "Whether the enable allow additional properties mode or not.",
"type": "boolean",
"default": true
}
},
"required": ["properties"]
},
{
"title": "The values form",
"description": "The values form is meant to describe instances that are JSON objects being used as an associative array.",
"type": "object",
"properties": {
"values": {
"$ref": "#"
}
},
"required": ["values"]
},
{
"title": "The discriminator form",
"description": "The discriminator form is meant to describe JSON objects being used in a fashion similar to a discriminated union construct in C-like languages.",
"type": "object",
"properties": {
"discriminator": { "type": "string" },
"mapping": {
"type": "object",
"patternProperties": {
".*": { "$ref": "#" }
}
}
},
"required": ["discriminator", "mapping"]
}
],
"properties": {
"nullable": { "type": "boolean" },
"metadata": { "type": "object", "title": "metadata" },
"definitions": {
"type": "object",
"patternProperties": {
".*": { "$ref": "#" }
}
}
}
}