Skip to content
This repository was archived by the owner on Nov 2, 2023. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit abd10d6

Browse files
committedNov 29, 2016
Copy draft-05 to latest location.
This copies the draft-05 meta-schemas to the top level, and updates the draft number on the documentation page.
1 parent 26b5456 commit abd10d6

File tree

4 files changed

+234
-262
lines changed

4 files changed

+234
-262
lines changed
 

‎documentation.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<h2>Specification</h2>
66
<div class="block">
7-
<p>The latest IETF published draft is v4. The specification is split into three parts:
7+
<p>The latest IETF published draft is v5. The specification is split into three parts:
88

99
<p>
1010
<table class="key-value">

‎hyper-schema

+74-123
Original file line numberDiff line numberDiff line change
@@ -1,159 +1,110 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/hyper-schema#",
3-
"id": "http://json-schema.org/draft-04/hyper-schema#",
2+
"$schema": "http://json-schema.org/draft-05/hyper-schema",
3+
"id": "http://json-schema.org/draft-05/hyper-schema",
44
"title": "JSON Hyper-Schema",
5-
"allOf": [
6-
{
7-
"$ref": "http://json-schema.org/draft-04/schema#"
8-
}
9-
],
10-
"properties": {
11-
"additionalItems": {
12-
"anyOf": [
13-
{
14-
"type": "boolean"
15-
},
16-
{
17-
"$ref": "#"
18-
}
19-
]
20-
},
21-
"additionalProperties": {
22-
"anyOf": [
23-
{
24-
"type": "boolean"
25-
},
26-
{
27-
"$ref": "#"
28-
}
29-
]
30-
},
31-
"dependencies": {
32-
"additionalProperties": {
33-
"anyOf": [
34-
{
35-
"$ref": "#"
36-
},
37-
{
38-
"type": "array"
39-
}
40-
]
41-
}
42-
},
43-
"items": {
44-
"anyOf": [
45-
{
46-
"$ref": "#"
47-
},
48-
{
49-
"$ref": "#/definitions/schemaArray"
50-
}
51-
]
52-
},
53-
"definitions": {
54-
"additionalProperties": {
55-
"$ref": "#"
56-
}
57-
},
58-
"patternProperties": {
59-
"additionalProperties": {
60-
"$ref": "#"
61-
}
62-
},
63-
"properties": {
64-
"additionalProperties": {
65-
"$ref": "#"
66-
}
67-
},
68-
"allOf": {
69-
"$ref": "#/definitions/schemaArray"
70-
},
71-
"anyOf": {
72-
"$ref": "#/definitions/schemaArray"
73-
},
74-
"oneOf": {
75-
"$ref": "#/definitions/schemaArray"
76-
},
77-
"not": {
78-
"$ref": "#"
79-
},
80-
81-
"links": {
82-
"type": "array",
83-
"items": {
84-
"$ref": "#/definitions/linkDescription"
85-
}
86-
},
87-
"fragmentResolution": {
88-
"type": "string"
89-
},
90-
"media": {
91-
"type": "object",
92-
"properties": {
93-
"type": {
94-
"description": "A media type, as described in RFC 2046",
95-
"type": "string"
96-
},
97-
"binaryEncoding": {
98-
"description": "A content encoding scheme, as described in RFC 2045",
99-
"type": "string"
100-
}
101-
}
102-
},
103-
"pathStart": {
104-
"description": "Instances' URIs must start with this value for this schema to apply to them",
105-
"type": "string",
106-
"format": "uri"
107-
}
108-
},
1095
"definitions": {
1106
"schemaArray": {
1117
"type": "array",
112-
"items": {
113-
"$ref": "#"
114-
}
8+
"items": { "$ref": "#" }
1159
},
11610
"linkDescription": {
11711
"title": "Link Description Object",
11812
"type": "object",
119-
"required": [ "href", "rel" ],
13+
"required": [ "href"],
12014
"properties": {
12115
"href": {
122-
"description": "a URI template, as defined by RFC 6570, with the addition of the $, ( and ) characters for pre-processing",
12316
"type": "string"
12417
},
12518
"rel": {
126-
"description": "relation to the target resource of the link",
12719
"type": "string"
12820
},
12921
"title": {
130-
"description": "a title for the link",
13122
"type": "string"
13223
},
133-
"targetSchema": {
134-
"description": "JSON Schema describing the link target",
135-
"$ref": "#"
136-
},
24+
"targetSchema": { "$ref": "#" },
13725
"mediaType": {
138-
"description": "media type (as defined by RFC 2046) describing the link target",
13926
"type": "string"
14027
},
14128
"method": {
142-
"description": "method for requesting the target of the link (e.g. for HTTP this might be \"GET\" or \"DELETE\")",
14329
"type": "string"
14430
},
14531
"encType": {
146-
"description": "The media type in which to submit data along with the request",
14732
"type": "string",
14833
"default": "application/json"
14934
},
150-
"schema": {
151-
"description": "Schema describing the data to submit along with the request",
152-
"$ref": "#"
35+
"schema": { "$ref": "#" }
36+
}
37+
},
38+
"hyperSchemaObject": {
39+
"properties": {
40+
"additionalItems": {
41+
"anyOf": [
42+
{ "type": "boolean" },
43+
{ "$ref": "#" }
44+
]
45+
},
46+
"additionalProperties": {
47+
"anyOf": [
48+
{ "type": "boolean" },
49+
{ "$ref": "#" }
50+
]
51+
},
52+
"dependencies": {
53+
"additionalProperties": {
54+
"anyOf": [
55+
{ "$ref": "#" },
56+
{ "type": "array" }
57+
]
58+
}
59+
},
60+
"items": {
61+
"anyOf": [
62+
{ "$ref": "#" },
63+
{ "$ref": "#/definitions/schemaArray" }
64+
]
65+
},
66+
"definitions": {
67+
"additionalProperties": { "$ref": "#" }
68+
},
69+
"patternProperties": {
70+
"additionalProperties": { "$ref": "#" }
71+
},
72+
"properties": {
73+
"additionalProperties": { "$ref": "#" }
74+
},
75+
"allOf": { "$ref": "#/definitions/schemaArray" },
76+
"anyOf": { "$ref": "#/definitions/schemaArray" },
77+
"oneOf": { "$ref": "#/definitions/schemaArray" },
78+
"not": { "$ref": "#" },
79+
80+
"base": {
81+
"type": "string"
82+
},
83+
"links": {
84+
"type": "array",
85+
"items": { "$ref": "#/definitions/linkDescription" }
86+
},
87+
"media": {
88+
"type": "object",
89+
"properties": {
90+
"type": {
91+
"type": "string"
92+
},
93+
"binaryEncoding": {
94+
"type": "string"
95+
}
96+
}
15397
}
15498
}
15599
}
156100
},
101+
"oneOf": [
102+
"allOf": [
103+
{ "$ref": "http://json-schema.org/draft-05/schema#/definitions/schemaObject" },
104+
{ "$ref": "#/definitions/hyperSchemaObject" }
105+
],
106+
{ "$ref": "http://json-schema.org/draft-05/schema#/definitions/jsonReference" }
107+
],
157108
"links": [
158109
{
159110
"rel": "self",

‎links

+5-17
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,30 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/hyper-schema#",
3-
"id": "http://json-schema.org/draft-04/links#",
2+
"$schema": "http://json-schema.org/draft-05/hyper-schema",
3+
"id": "http://json-schema.org/draft-05/links",
44
"title": "Link Description Object",
55
"type": "object",
6-
"required": [ "href", "rel" ],
6+
"required": [ "href" ],
77
"properties": {
88
"href": {
9-
"description": "a URI template, as defined by RFC 6570, with the addition of the $, ( and ) characters for pre-processing",
109
"type": "string"
1110
},
1211
"rel": {
13-
"description": "relation to the target resource of the link",
1412
"type": "string"
1513
},
1614
"title": {
17-
"description": "a title for the link",
1815
"type": "string"
1916
},
20-
"targetSchema": {
21-
"description": "JSON Schema describing the link target",
22-
"$ref": "hyper-schema#"
23-
},
17+
"targetSchema": { "$ref": "hyper-schema" },
2418
"mediaType": {
25-
"description": "media type (as defined by RFC 2046) describing the link target",
2619
"type": "string"
2720
},
2821
"method": {
29-
"description": "method for requesting the target of the link (e.g. for HTTP this might be \"GET\" or \"DELETE\")",
3022
"type": "string"
3123
},
3224
"encType": {
33-
"description": "The media type in which to submit data along with the request",
3425
"type": "string",
3526
"default": "application/json"
3627
},
37-
"schema": {
38-
"description": "Schema describing the data to submit along with the request",
39-
"$ref": "hyper-schema#"
40-
}
28+
"schema": { "$ref": "hyper-schema" }
4129
}
4230
}

‎schema

+154-121
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
11
{
2-
"id": "http://json-schema.org/draft-04/schema#",
3-
"$schema": "http://json-schema.org/draft-04/schema#",
4-
"description": "Core schema meta-schema",
2+
"$schema": "http://json-schema.org/draft-05/schema",
3+
"id": "http://json-schema.org/draft-05/schema",
4+
"title": "Core schema meta-schema",
55
"definitions": {
6+
"jsonReference": {
7+
"type": "object",
8+
"properties": {
9+
"$ref": {
10+
"type": "string",
11+
"format": "uriref"
12+
}
13+
},
14+
"required": [ "$ref" ]
15+
},
616
"schemaArray": {
717
"type": "array",
818
"minItems": 1,
@@ -13,138 +23,161 @@
1323
"minimum": 0
1424
},
1525
"positiveIntegerDefault0": {
16-
"allOf": [ { "$ref": "#/definitions/positiveInteger" }, { "default": 0 } ]
26+
"allOf": [
27+
{ "$ref": "#/definitions/positiveInteger" },
28+
{ "default": 0 }
29+
]
1730
},
1831
"simpleTypes": {
19-
"enum": [ "array", "boolean", "integer", "null", "number", "object", "string" ]
32+
"enum": [
33+
"array",
34+
"boolean",
35+
"integer",
36+
"null",
37+
"number",
38+
"object",
39+
"string"
40+
]
2041
},
2142
"stringArray": {
2243
"type": "array",
2344
"items": { "type": "string" },
2445
"minItems": 1,
2546
"uniqueItems": true
26-
}
27-
},
28-
"type": "object",
29-
"properties": {
30-
"id": {
31-
"type": "string",
32-
"format": "uri"
33-
},
34-
"$schema": {
35-
"type": "string",
36-
"format": "uri"
37-
},
38-
"title": {
39-
"type": "string"
40-
},
41-
"description": {
42-
"type": "string"
43-
},
44-
"default": {},
45-
"multipleOf": {
46-
"type": "number",
47-
"minimum": 0,
48-
"exclusiveMinimum": true
49-
},
50-
"maximum": {
51-
"type": "number"
52-
},
53-
"exclusiveMaximum": {
54-
"type": "boolean",
55-
"default": false
56-
},
57-
"minimum": {
58-
"type": "number"
59-
},
60-
"exclusiveMinimum": {
61-
"type": "boolean",
62-
"default": false
63-
},
64-
"maxLength": { "$ref": "#/definitions/positiveInteger" },
65-
"minLength": { "$ref": "#/definitions/positiveIntegerDefault0" },
66-
"pattern": {
67-
"type": "string",
68-
"format": "regex"
69-
},
70-
"additionalItems": {
71-
"anyOf": [
72-
{ "type": "boolean" },
73-
{ "$ref": "#" }
74-
],
75-
"default": {}
76-
},
77-
"items": {
78-
"anyOf": [
79-
{ "$ref": "#" },
80-
{ "$ref": "#/definitions/schemaArray" }
81-
],
82-
"default": {}
83-
},
84-
"maxItems": { "$ref": "#/definitions/positiveInteger" },
85-
"minItems": { "$ref": "#/definitions/positiveIntegerDefault0" },
86-
"uniqueItems": {
87-
"type": "boolean",
88-
"default": false
8947
},
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": {}
99-
},
100-
"definitions": {
101-
"type": "object",
102-
"additionalProperties": { "$ref": "#" },
103-
"default": {}
104-
},
105-
"properties": {
106-
"type": "object",
107-
"additionalProperties": { "$ref": "#" },
108-
"default": {}
109-
},
110-
"patternProperties": {
48+
"schemaObject": {
11149
"type": "object",
112-
"additionalProperties": { "$ref": "#" },
113-
"default": {}
114-
},
115-
"dependencies": {
116-
"type": "object",
117-
"additionalProperties": {
118-
"anyOf": [
119-
{ "$ref": "#" },
120-
{ "$ref": "#/definitions/stringArray" }
121-
]
122-
}
123-
},
124-
"enum": {
125-
"type": "array",
126-
"minItems": 1,
127-
"uniqueItems": true
128-
},
129-
"type": {
130-
"anyOf": [
131-
{ "$ref": "#/definitions/simpleTypes" },
132-
{
50+
"properties": {
51+
"id": {
52+
"type": "string",
53+
"format": "uriref"
54+
},
55+
"$schema": {
56+
"type": "string",
57+
"format": "uri"
58+
},
59+
"title": {
60+
"type": "string"
61+
},
62+
"description": {
63+
"type": "string"
64+
},
65+
"default": {},
66+
"multipleOf": {
67+
"type": "number",
68+
"minimum": 0,
69+
"exclusiveMinimum": true
70+
},
71+
"maximum": {
72+
"type": "number"
73+
},
74+
"exclusiveMaximum": {
75+
"type": "boolean",
76+
"default": false
77+
},
78+
"minimum": {
79+
"type": "number"
80+
},
81+
"exclusiveMinimum": {
82+
"type": "boolean",
83+
"default": false
84+
},
85+
"maxLength": { "$ref": "#/definitions/positiveInteger" },
86+
"minLength": { "$ref": "#/definitions/positiveIntegerDefault0" },
87+
"pattern": {
88+
"type": "string",
89+
"format": "regex"
90+
},
91+
"additionalItems": {
92+
"anyOf": [
93+
{ "type": "boolean" },
94+
{ "$ref": "#" }
95+
],
96+
"default": {}
97+
},
98+
"items": {
99+
"anyOf": [
100+
{ "$ref": "#" },
101+
{ "$ref": "#/definitions/schemaArray" }
102+
],
103+
"default": {}
104+
},
105+
"maxItems": { "$ref": "#/definitions/positiveInteger" },
106+
"minItems": { "$ref": "#/definitions/positiveIntegerDefault0" },
107+
"uniqueItems": {
108+
"type": "boolean",
109+
"default": false
110+
},
111+
"maxProperties": { "$ref": "#/definitions/positiveInteger" },
112+
"minProperties": { "$ref": "#/definitions/positiveIntegerDefault0" },
113+
"required": { "$ref": "#/definitions/stringArray" },
114+
"additionalProperties": {
115+
"anyOf": [
116+
{ "type": "boolean" },
117+
{ "$ref": "#" }
118+
],
119+
"default": {}
120+
},
121+
"definitions": {
122+
"type": "object",
123+
"additionalProperties": { "$ref": "#" },
124+
"default": {}
125+
},
126+
"properties": {
127+
"type": "object",
128+
"additionalProperties": { "$ref": "#" },
129+
"default": {}
130+
},
131+
"patternProperties": {
132+
"type": "object",
133+
"additionalProperties": { "$ref": "#" },
134+
"default": {}
135+
},
136+
"dependencies": {
137+
"type": "object",
138+
"additionalProperties": {
139+
"anyOf": [
140+
{ "$ref": "#" },
141+
{ "$ref": "#/definitions/stringArray" }
142+
]
143+
}
144+
},
145+
"enum": {
133146
"type": "array",
134-
"items": { "$ref": "#/definitions/simpleTypes" },
135147
"minItems": 1,
136148
"uniqueItems": true
149+
},
150+
"type": {
151+
"anyOf": [
152+
{ "$ref": "#/definitions/simpleTypes" },
153+
{
154+
"type": "array",
155+
"items": { "$ref": "#/definitions/simpleTypes" },
156+
"minItems": 1,
157+
"uniqueItems": true
158+
}
159+
]
160+
},
161+
"format": { "type": "string" },
162+
"allOf": { "$ref": "#/definitions/schemaArray" },
163+
"anyOf": { "$ref": "#/definitions/schemaArray" },
164+
"oneOf": { "$ref": "#/definitions/schemaArray" },
165+
"not": { "$ref": "#" }
166+
},
167+
"dependencies": {
168+
"exclusiveMaximum": [ "maximum" ],
169+
"exclusiveMinimum": [ "minimum" ]
170+
},
171+
"not": {
172+
"properties": {
173+
"$ref": {}
137174
}
138-
]
139-
},
140-
"allOf": { "$ref": "#/definitions/schemaArray" },
141-
"anyOf": { "$ref": "#/definitions/schemaArray" },
142-
"oneOf": { "$ref": "#/definitions/schemaArray" },
143-
"not": { "$ref": "#" }
144-
},
145-
"dependencies": {
146-
"exclusiveMaximum": [ "maximum" ],
147-
"exclusiveMinimum": [ "minimum" ]
175+
}
176+
}
148177
},
178+
"oneOf": [
179+
{ "$ref": "#/definitions/schemaObject" },
180+
{ "$ref": "#/definitions/jsonReference" }
181+
],
149182
"default": {}
150183
}

0 commit comments

Comments
 (0)
This repository has been archived.