Skip to content

Commit 66ee57a

Browse files
draft-4: elements sorted (the same way as in official meta schema), properties.id.format and properties.$schema.format was dropped to stay in sync with official meta schema, patch kept
1 parent 7dd7acb commit 66ee57a

File tree

1 file changed

+94
-169
lines changed

1 file changed

+94
-169
lines changed

jsonschema/schemas/draft4.json

Lines changed: 94 additions & 169 deletions
Original file line numberDiff line numberDiff line change
@@ -1,222 +1,147 @@
11
{
2+
"id": "http://json-schema.org/draft-04/schema#",
23
"$schema": "http://json-schema.org/draft-04/schema#",
3-
"default": {},
4+
"description": "Core schema meta-schema",
45
"definitions": {
6+
"schemaArray": {
7+
"type": "array",
8+
"minItems": 1,
9+
"items": { "$ref": "#" }
10+
},
511
"positiveInteger": {
6-
"minimum": 0,
7-
"type": "integer"
12+
"type": "integer",
13+
"minimum": 0
814
},
915
"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 } ]
2517
},
2618
"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" ]
3620
},
3721
"stringArray": {
38-
"items": {
39-
"type": "string"
40-
},
41-
"minItems": 1,
4222
"type": "array",
23+
"items": { "type": "string" },
24+
"minItems": 1,
4325
"uniqueItems": true
4426
}
4527
},
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",
5629
"properties": {
57-
"$schema": {
58-
"format": "uri",
30+
"id": {
5931
"type": "string"
6032
},
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"
33+
"$schema": {
34+
"type": "string"
9635
},
97-
"dependencies": {
98-
"additionalProperties": {
99-
"anyOf": [
100-
{
101-
"$ref": "#"
102-
},
103-
{
104-
"$ref": "#/definitions/stringArray"
105-
}
106-
]
107-
},
108-
"type": "object"
36+
"title": {
37+
"type": "string"
10938
},
11039
"description": {
11140
"type": "string"
11241
},
113-
"enum": {
114-
"type": "array"
42+
"default": {},
43+
"multipleOf": {
44+
"type": "number",
45+
"minimum": 0,
46+
"exclusiveMinimum": true
47+
},
48+
"maximum": {
49+
"type": "number"
11550
},
11651
"exclusiveMaximum": {
117-
"default": false,
118-
"type": "boolean"
52+
"type": "boolean",
53+
"default": false
54+
},
55+
"minimum": {
56+
"type": "number"
11957
},
12058
"exclusiveMinimum": {
121-
"default": false,
122-
"type": "boolean"
59+
"type": "boolean",
60+
"default": false
12361
},
124-
"format": {
125-
"type": "string"
62+
"maxLength": { "$ref": "#/definitions/positiveInteger" },
63+
"minLength": { "$ref": "#/definitions/positiveIntegerDefault0" },
64+
"pattern": {
65+
"type": "string",
66+
"format": "regex"
12667
},
127-
"id": {
128-
"format": "uri",
129-
"type": "string"
68+
"additionalItems": {
69+
"anyOf": [
70+
{ "type": "boolean" },
71+
{ "$ref": "#" }
72+
],
73+
"default": {}
13074
},
13175
"items": {
13276
"anyOf": [
133-
{
134-
"$ref": "#"
135-
},
136-
{
137-
"$ref": "#/definitions/schemaArray"
138-
}
77+
{ "$ref": "#" },
78+
{ "$ref": "#/definitions/schemaArray" }
13979
],
14080
"default": {}
14181
},
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"
82+
"maxItems": { "$ref": "#/definitions/positiveInteger" },
83+
"minItems": { "$ref": "#/definitions/positiveIntegerDefault0" },
84+
"uniqueItems": {
85+
"type": "boolean",
86+
"default": false
17087
},
171-
"not": {
172-
"$ref": "#"
88+
"maxProperties": { "$ref": "#/definitions/positiveInteger" },
89+
"minProperties": { "$ref": "#/definitions/positiveIntegerDefault0" },
90+
"required": { "$ref": "#/definitions/stringArray" },
91+
"additionalProperties": {
92+
"anyOf": [
93+
{ "type": "boolean" },
94+
{ "$ref": "#" }
95+
],
96+
"default": {}
17397
},
174-
"oneOf": {
175-
"$ref": "#/definitions/schemaArray"
98+
"definitions": {
99+
"type": "object",
100+
"additionalProperties": { "$ref": "#" },
101+
"default": {}
176102
},
177-
"pattern": {
178-
"format": "regex",
179-
"type": "string"
103+
"properties": {
104+
"type": "object",
105+
"additionalProperties": { "$ref": "#" },
106+
"default": {}
180107
},
181108
"patternProperties": {
182-
"additionalProperties": {
183-
"$ref": "#"
184-
},
185-
"default": {},
186-
"type": "object"
109+
"type": "object",
110+
"additionalProperties": { "$ref": "#" },
111+
"default": {}
187112
},
188-
"properties": {
113+
"dependencies": {
114+
"type": "object",
189115
"additionalProperties": {
190-
"$ref": "#"
191-
},
192-
"default": {},
193-
"type": "object"
194-
},
195-
"required": {
196-
"$ref": "#/definitions/stringArray"
116+
"anyOf": [
117+
{ "$ref": "#" },
118+
{ "$ref": "#/definitions/stringArray" }
119+
]
120+
}
197121
},
198-
"title": {
199-
"type": "string"
122+
"enum": {
123+
"type": "array"
200124
},
201125
"type": {
202126
"anyOf": [
127+
{ "$ref": "#/definitions/simpleTypes" },
203128
{
204-
"$ref": "#/definitions/simpleTypes"
205-
},
206-
{
207-
"items": {
208-
"$ref": "#/definitions/simpleTypes"
209-
},
210-
"minItems": 1,
211129
"type": "array",
130+
"items": { "$ref": "#/definitions/simpleTypes" },
131+
"minItems": 1,
212132
"uniqueItems": true
213133
}
214134
]
215135
},
216-
"uniqueItems": {
217-
"default": false,
218-
"type": "boolean"
219-
}
136+
"format": { "type": "string" },
137+
"allOf": { "$ref": "#/definitions/schemaArray" },
138+
"anyOf": { "$ref": "#/definitions/schemaArray" },
139+
"oneOf": { "$ref": "#/definitions/schemaArray" },
140+
"not": { "$ref": "#" }
141+
},
142+
"dependencies": {
143+
"exclusiveMaximum": [ "maximum" ],
144+
"exclusiveMinimum": [ "minimum" ]
220145
},
221-
"type": "object"
146+
"default": {}
222147
}

0 commit comments

Comments
 (0)