|
1 | 1 | {
|
| 2 | + "id": "http://json-schema.org/draft-04/schema#", |
2 | 3 | "$schema": "http://json-schema.org/draft-04/schema#",
|
3 |
| - "default": {}, |
| 4 | + "description": "Core schema meta-schema", |
4 | 5 | "definitions": {
|
| 6 | + "schemaArray": { |
| 7 | + "type": "array", |
| 8 | + "minItems": 1, |
| 9 | + "items": { "$ref": "#" } |
| 10 | + }, |
5 | 11 | "positiveInteger": {
|
6 |
| - "minimum": 0, |
7 |
| - "type": "integer" |
| 12 | + "type": "integer", |
| 13 | + "minimum": 0 |
8 | 14 | },
|
9 | 15 | "positiveIntegerDefault0": {
|
10 |
| - "allOf": [ |
11 |
| - { |
12 |
| - "$ref": "#/definitions/positiveInteger" |
13 |
| - }, |
14 |
| - { |
15 |
| - "default": 0 |
16 |
| - } |
17 |
| - ] |
18 |
| - }, |
19 |
| - "schemaArray": { |
20 |
| - "items": { |
21 |
| - "$ref": "#" |
22 |
| - }, |
23 |
| - "minItems": 1, |
24 |
| - "type": "array" |
| 16 | + "allOf": [ { "$ref": "#/definitions/positiveInteger" }, { "default": 0 } ] |
25 | 17 | },
|
26 | 18 | "simpleTypes": {
|
27 |
| - "enum": [ |
28 |
| - "array", |
29 |
| - "boolean", |
30 |
| - "integer", |
31 |
| - "null", |
32 |
| - "number", |
33 |
| - "object", |
34 |
| - "string" |
35 |
| - ] |
| 19 | + "enum": [ "array", "boolean", "integer", "null", "number", "object", "string" ] |
36 | 20 | },
|
37 | 21 | "stringArray": {
|
38 |
| - "items": { |
39 |
| - "type": "string" |
40 |
| - }, |
41 |
| - "minItems": 1, |
42 | 22 | "type": "array",
|
| 23 | + "items": { "type": "string" }, |
| 24 | + "minItems": 1, |
43 | 25 | "uniqueItems": true
|
44 | 26 | }
|
45 | 27 | },
|
46 |
| - "dependencies": { |
47 |
| - "exclusiveMaximum": [ |
48 |
| - "maximum" |
49 |
| - ], |
50 |
| - "exclusiveMinimum": [ |
51 |
| - "minimum" |
52 |
| - ] |
53 |
| - }, |
54 |
| - "description": "Core schema meta-schema", |
55 |
| - "id": "http://json-schema.org/draft-04/schema#", |
| 28 | + "type": "object", |
56 | 29 | "properties": {
|
57 |
| - "$schema": { |
| 30 | + "id": { |
58 | 31 | "format": "uri",
|
59 | 32 | "type": "string"
|
60 | 33 | },
|
61 |
| - "additionalItems": { |
62 |
| - "anyOf": [ |
63 |
| - { |
64 |
| - "type": "boolean" |
65 |
| - }, |
66 |
| - { |
67 |
| - "$ref": "#" |
68 |
| - } |
69 |
| - ], |
70 |
| - "default": {} |
71 |
| - }, |
72 |
| - "additionalProperties": { |
73 |
| - "anyOf": [ |
74 |
| - { |
75 |
| - "type": "boolean" |
76 |
| - }, |
77 |
| - { |
78 |
| - "$ref": "#" |
79 |
| - } |
80 |
| - ], |
81 |
| - "default": {} |
82 |
| - }, |
83 |
| - "allOf": { |
84 |
| - "$ref": "#/definitions/schemaArray" |
85 |
| - }, |
86 |
| - "anyOf": { |
87 |
| - "$ref": "#/definitions/schemaArray" |
88 |
| - }, |
89 |
| - "default": {}, |
90 |
| - "definitions": { |
91 |
| - "additionalProperties": { |
92 |
| - "$ref": "#" |
93 |
| - }, |
94 |
| - "default": {}, |
95 |
| - "type": "object" |
| 34 | + "$schema": { |
| 35 | + "type": "string", |
| 36 | + "format": "uri" |
96 | 37 | },
|
97 |
| - "dependencies": { |
98 |
| - "additionalProperties": { |
99 |
| - "anyOf": [ |
100 |
| - { |
101 |
| - "$ref": "#" |
102 |
| - }, |
103 |
| - { |
104 |
| - "$ref": "#/definitions/stringArray" |
105 |
| - } |
106 |
| - ] |
107 |
| - }, |
108 |
| - "type": "object" |
| 38 | + "title": { |
| 39 | + "type": "string" |
109 | 40 | },
|
110 | 41 | "description": {
|
111 | 42 | "type": "string"
|
112 | 43 | },
|
113 |
| - "enum": { |
114 |
| - "type": "array" |
| 44 | + "default": {}, |
| 45 | + "multipleOf": { |
| 46 | + "type": "number", |
| 47 | + "minimum": 0, |
| 48 | + "exclusiveMinimum": true |
| 49 | + }, |
| 50 | + "maximum": { |
| 51 | + "type": "number" |
115 | 52 | },
|
116 | 53 | "exclusiveMaximum": {
|
117 |
| - "default": false, |
118 |
| - "type": "boolean" |
| 54 | + "type": "boolean", |
| 55 | + "default": false |
| 56 | + }, |
| 57 | + "minimum": { |
| 58 | + "type": "number" |
119 | 59 | },
|
120 | 60 | "exclusiveMinimum": {
|
121 |
| - "default": false, |
122 |
| - "type": "boolean" |
| 61 | + "type": "boolean", |
| 62 | + "default": false |
123 | 63 | },
|
124 |
| - "format": { |
125 |
| - "type": "string" |
| 64 | + "maxLength": { "$ref": "#/definitions/positiveInteger" }, |
| 65 | + "minLength": { "$ref": "#/definitions/positiveIntegerDefault0" }, |
| 66 | + "pattern": { |
| 67 | + "type": "string", |
| 68 | + "format": "regex" |
126 | 69 | },
|
127 |
| - "id": { |
128 |
| - "format": "uri", |
129 |
| - "type": "string" |
| 70 | + "additionalItems": { |
| 71 | + "anyOf": [ |
| 72 | + { "type": "boolean" }, |
| 73 | + { "$ref": "#" } |
| 74 | + ], |
| 75 | + "default": {} |
130 | 76 | },
|
131 | 77 | "items": {
|
132 | 78 | "anyOf": [
|
133 |
| - { |
134 |
| - "$ref": "#" |
135 |
| - }, |
136 |
| - { |
137 |
| - "$ref": "#/definitions/schemaArray" |
138 |
| - } |
| 79 | + { "$ref": "#" }, |
| 80 | + { "$ref": "#/definitions/schemaArray" } |
139 | 81 | ],
|
140 | 82 | "default": {}
|
141 | 83 | },
|
142 |
| - "maxItems": { |
143 |
| - "$ref": "#/definitions/positiveInteger" |
144 |
| - }, |
145 |
| - "maxLength": { |
146 |
| - "$ref": "#/definitions/positiveInteger" |
147 |
| - }, |
148 |
| - "maxProperties": { |
149 |
| - "$ref": "#/definitions/positiveInteger" |
150 |
| - }, |
151 |
| - "maximum": { |
152 |
| - "type": "number" |
153 |
| - }, |
154 |
| - "minItems": { |
155 |
| - "$ref": "#/definitions/positiveIntegerDefault0" |
156 |
| - }, |
157 |
| - "minLength": { |
158 |
| - "$ref": "#/definitions/positiveIntegerDefault0" |
159 |
| - }, |
160 |
| - "minProperties": { |
161 |
| - "$ref": "#/definitions/positiveIntegerDefault0" |
162 |
| - }, |
163 |
| - "minimum": { |
164 |
| - "type": "number" |
165 |
| - }, |
166 |
| - "multipleOf": { |
167 |
| - "exclusiveMinimum": true, |
168 |
| - "minimum": 0, |
169 |
| - "type": "number" |
| 84 | + "maxItems": { "$ref": "#/definitions/positiveInteger" }, |
| 85 | + "minItems": { "$ref": "#/definitions/positiveIntegerDefault0" }, |
| 86 | + "uniqueItems": { |
| 87 | + "type": "boolean", |
| 88 | + "default": false |
170 | 89 | },
|
171 |
| - "not": { |
172 |
| - "$ref": "#" |
| 90 | + "maxProperties": { "$ref": "#/definitions/positiveInteger" }, |
| 91 | + "minProperties": { "$ref": "#/definitions/positiveIntegerDefault0" }, |
| 92 | + "required": { "$ref": "#/definitions/stringArray" }, |
| 93 | + "additionalProperties": { |
| 94 | + "anyOf": [ |
| 95 | + { "type": "boolean" }, |
| 96 | + { "$ref": "#" } |
| 97 | + ], |
| 98 | + "default": {} |
173 | 99 | },
|
174 |
| - "oneOf": { |
175 |
| - "$ref": "#/definitions/schemaArray" |
| 100 | + "definitions": { |
| 101 | + "type": "object", |
| 102 | + "additionalProperties": { "$ref": "#" }, |
| 103 | + "default": {} |
176 | 104 | },
|
177 |
| - "pattern": { |
178 |
| - "format": "regex", |
179 |
| - "type": "string" |
| 105 | + "properties": { |
| 106 | + "type": "object", |
| 107 | + "additionalProperties": { "$ref": "#" }, |
| 108 | + "default": {} |
180 | 109 | },
|
181 | 110 | "patternProperties": {
|
182 |
| - "additionalProperties": { |
183 |
| - "$ref": "#" |
184 |
| - }, |
185 |
| - "default": {}, |
186 |
| - "type": "object" |
| 111 | + "type": "object", |
| 112 | + "additionalProperties": { "$ref": "#" }, |
| 113 | + "default": {} |
187 | 114 | },
|
188 |
| - "properties": { |
| 115 | + "dependencies": { |
| 116 | + "type": "object", |
189 | 117 | "additionalProperties": {
|
190 |
| - "$ref": "#" |
191 |
| - }, |
192 |
| - "default": {}, |
193 |
| - "type": "object" |
194 |
| - }, |
195 |
| - "required": { |
196 |
| - "$ref": "#/definitions/stringArray" |
| 118 | + "anyOf": [ |
| 119 | + { "$ref": "#" }, |
| 120 | + { "$ref": "#/definitions/stringArray" } |
| 121 | + ] |
| 122 | + } |
197 | 123 | },
|
198 |
| - "title": { |
199 |
| - "type": "string" |
| 124 | + "enum": { |
| 125 | + "type": "array" |
200 | 126 | },
|
201 | 127 | "type": {
|
202 | 128 | "anyOf": [
|
| 129 | + { "$ref": "#/definitions/simpleTypes" }, |
203 | 130 | {
|
204 |
| - "$ref": "#/definitions/simpleTypes" |
205 |
| - }, |
206 |
| - { |
207 |
| - "items": { |
208 |
| - "$ref": "#/definitions/simpleTypes" |
209 |
| - }, |
210 |
| - "minItems": 1, |
211 | 131 | "type": "array",
|
| 132 | + "items": { "$ref": "#/definitions/simpleTypes" }, |
| 133 | + "minItems": 1, |
212 | 134 | "uniqueItems": true
|
213 | 135 | }
|
214 | 136 | ]
|
215 | 137 | },
|
216 |
| - "uniqueItems": { |
217 |
| - "default": false, |
218 |
| - "type": "boolean" |
219 |
| - } |
| 138 | + "format": { "type": "string" }, |
| 139 | + "allOf": { "$ref": "#/definitions/schemaArray" }, |
| 140 | + "anyOf": { "$ref": "#/definitions/schemaArray" }, |
| 141 | + "oneOf": { "$ref": "#/definitions/schemaArray" }, |
| 142 | + "not": { "$ref": "#" } |
| 143 | + }, |
| 144 | + "dependencies": { |
| 145 | + "exclusiveMaximum": [ "maximum" ], |
| 146 | + "exclusiveMinimum": [ "minimum" ] |
220 | 147 | },
|
221 |
| - "type": "object" |
| 148 | + "default": {} |
222 | 149 | }
|
0 commit comments