Skip to content
This repository was archived by the owner on Nov 2, 2023. It is now read-only.

Commit fc213b7

Browse files
committed
draft-04/schema: fix two issues, unify style
Both "disallow" and "type", when arrays, must have at least one element. Unify style in the document: * spaces, not tabs; * tabs are 4 characters; * no space between an object member and a semicolon; * spaces after the opening bracket/before the closing bracket; * spaces after the opening accolade/before the closing accolade.
1 parent d24139d commit fc213b7

File tree

1 file changed

+183
-181
lines changed

1 file changed

+183
-181
lines changed

draft-04/schema

Lines changed: 183 additions & 181 deletions
Original file line numberDiff line numberDiff line change
@@ -1,183 +1,185 @@
11
{
2-
"$schema" : "http://json-schema.org/draft-04/schema#",
3-
"id" : "http://json-schema.org/draft-04/schema#",
4-
"type" : "object",
5-
6-
"properties" : {
7-
"type" : {
8-
"type" : ["string", "array"],
9-
"items" : {
10-
"type" : ["string", {"$ref" : "#"}]
11-
},
12-
"uniqueItems" : true,
13-
"default" : "any"
14-
},
15-
16-
"disallow" : {
17-
"type" : ["string", "array"],
18-
"items" : {
19-
"type" : ["string", {"$ref" : "#"}]
20-
},
21-
"uniqueItems" : true
22-
},
23-
24-
"extends" : {
25-
"type" : [{"$ref" : "#"}, "array"],
26-
"items" : {"$ref" : "#"},
27-
"default" : {}
28-
},
29-
30-
"enum" : {
31-
"type" : "array",
32-
"minItems" : 1,
33-
"uniqueItems" : true
34-
},
35-
36-
"minimum" : {
37-
"type" : "number"
38-
},
39-
40-
"maximum" : {
41-
"type" : "number"
42-
},
43-
44-
"exclusiveMinimum" : {
45-
"type" : "boolean",
46-
"default" : false
47-
},
48-
49-
"exclusiveMaximum" : {
50-
"type" : "boolean",
51-
"default" : false
52-
},
53-
54-
"mod" : {
55-
"type" : "number",
56-
"minimum" : 0,
57-
"exclusiveMinimum" : true,
58-
"default" : 1
59-
},
60-
61-
"minLength" : {
62-
"type" : "integer",
63-
"minimum" : 0,
64-
"default" : 0
65-
},
66-
67-
"maxLength" : {
68-
"type" : "integer"
69-
},
70-
71-
"pattern" : {
72-
"type" : "string",
73-
"format": "regex"
74-
},
75-
76-
"items" : {
77-
"type" : [{"$ref" : "#"}, "array"],
78-
"items" : {"$ref" : "#"},
79-
"default" : {}
80-
},
81-
82-
"additionalItems" : {
83-
"type" : [{"$ref" : "#"}, "boolean"],
84-
"default" : {}
85-
},
86-
87-
"minItems" : {
88-
"type" : "integer",
89-
"minimum" : 0,
90-
"default" : 0
91-
},
92-
93-
"maxItems" : {
94-
"type" : "integer",
95-
"minimum" : 0
96-
},
97-
98-
"uniqueItems" : {
99-
"type" : "boolean",
100-
"default" : false
101-
},
102-
103-
"properties" : {
104-
"type" : "object",
105-
"additionalProperties" : {"$ref" : "#"},
106-
"default" : {}
107-
},
108-
109-
"patternProperties" : {
110-
"type" : "object",
111-
"additionalProperties" : {"$ref" : "#"},
112-
"default" : {}
113-
},
114-
115-
"additionalProperties" : {
116-
"type" : [{"$ref" : "#"}, "boolean"],
117-
"default" : {}
118-
},
119-
120-
"minProperties" : {
121-
"type" : "integer",
122-
"minimum" : 0,
123-
"default" : 0
124-
},
125-
126-
"maxProperties" : {
127-
"type" : "integer",
128-
"minimum" : 0
129-
},
130-
131-
"required" : {
132-
"type" : "array",
133-
"items" : {
134-
"type" : "string"
135-
}
136-
},
137-
138-
"dependencies" : {
139-
"type" : "object",
140-
"additionalProperties" : {
141-
"type" : ["string", "array", {"$ref" : "#"}],
142-
"items" : {
143-
"type" : "string"
144-
}
145-
},
146-
"default" : {}
147-
},
148-
149-
"id" : {
150-
"type" : "string",
151-
"format": "uri"
152-
},
153-
154-
"$ref" : {
155-
"type" : "string",
156-
"format": "uri"
157-
},
158-
159-
"$schema" : {
160-
"type" : "string",
161-
"format": "uri"
162-
},
163-
164-
"title" : {
165-
"type" : "string"
166-
},
167-
168-
"description" : {
169-
"type" : "string"
170-
},
171-
172-
"default" : {
173-
"type" : "any"
174-
}
175-
},
176-
177-
"dependencies" : {
178-
"exclusiveMinimum" : "minimum",
179-
"exclusiveMaximum" : "maximum"
180-
},
181-
182-
"default" : {}
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"id": "http://json-schema.org/draft-04/schema#",
4+
"type": "object",
5+
6+
"properties": {
7+
"type": {
8+
"type": [ "string", "array" ],
9+
"items": {
10+
"type": [ "string", {"$ref": "#"} ]
11+
},
12+
"uniqueItems": true,
13+
"minItems": 1,
14+
"default": "any"
15+
},
16+
17+
"disallow": {
18+
"type": [ "string", "array" ],
19+
"items": {
20+
"type": [ "string", { "$ref": "#" } ]
21+
},
22+
"uniqueItems": true,
23+
"minItems": 1
24+
},
25+
26+
"extends": {
27+
"type": [ {"$ref": "#" }, "array" ],
28+
"items": { "$ref": "#" },
29+
"default": {}
30+
},
31+
32+
"enum": {
33+
"type": "array",
34+
"minItems": 1,
35+
"uniqueItems": true
36+
},
37+
38+
"minimum": {
39+
"type": "number"
40+
},
41+
42+
"maximum": {
43+
"type": "number"
44+
},
45+
46+
"exclusiveMinimum": {
47+
"type": "boolean",
48+
"default": false
49+
},
50+
51+
"exclusiveMaximum": {
52+
"type": "boolean",
53+
"default": false
54+
},
55+
56+
"mod": {
57+
"type": "number",
58+
"minimum": 0,
59+
"exclusiveMinimum": true,
60+
"default": 1
61+
},
62+
63+
"minLength": {
64+
"type": "integer",
65+
"minimum": 0,
66+
"default": 0
67+
},
68+
69+
"maxLength": {
70+
"type": "integer"
71+
},
72+
73+
"pattern": {
74+
"type": "string",
75+
"format": "regex"
76+
},
77+
78+
"items": {
79+
"type": [ { "$ref": "#" }, "array" ],
80+
"items": {"$ref": "#"},
81+
"default": {}
82+
},
83+
84+
"additionalItems": {
85+
"type": [ { "$ref": "#" }, "boolean" ],
86+
"default": {}
87+
},
88+
89+
"minItems": {
90+
"type": "integer",
91+
"minimum": 0,
92+
"default": 0
93+
},
94+
95+
"maxItems": {
96+
"type": "integer",
97+
"minimum": 0
98+
},
99+
100+
"uniqueItems": {
101+
"type": "boolean",
102+
"default": false
103+
},
104+
105+
"properties": {
106+
"type": "object",
107+
"additionalProperties": { "$ref": "#" },
108+
"default": {}
109+
},
110+
111+
"patternProperties": {
112+
"type": "object",
113+
"additionalProperties": { "$ref": "#" },
114+
"default": {}
115+
},
116+
117+
"additionalProperties": {
118+
"type": [ {"$ref": "#" }, "boolean" ],
119+
"default": {}
120+
},
121+
122+
"minProperties": {
123+
"type": "integer",
124+
"minimum": 0,
125+
"default": 0
126+
},
127+
128+
"maxProperties": {
129+
"type": "integer",
130+
"minimum": 0
131+
},
132+
133+
"required": {
134+
"type": "array",
135+
"items": {
136+
"type": "string"
137+
}
138+
},
139+
140+
"dependencies": {
141+
"type": "object",
142+
"additionalProperties": {
143+
"type": [ "string", "array", { "$ref": "#" } ],
144+
"items": {
145+
"type": "string"
146+
}
147+
},
148+
"default": {}
149+
},
150+
151+
"id": {
152+
"type": "string",
153+
"format": "uri"
154+
},
155+
156+
"$ref": {
157+
"type": "string",
158+
"format": "uri"
159+
},
160+
161+
"$schema": {
162+
"type": "string",
163+
"format": "uri"
164+
},
165+
166+
"title": {
167+
"type": "string"
168+
},
169+
170+
"description": {
171+
"type": "string"
172+
},
173+
174+
"default": {
175+
"type": "any"
176+
}
177+
},
178+
179+
"dependencies": {
180+
"exclusiveMinimum": "minimum",
181+
"exclusiveMaximum": "maximum"
182+
},
183+
184+
"default": {}
183185
}

0 commit comments

Comments
 (0)