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

Commit abd10d6

Browse files
committed
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
}

0 commit comments

Comments
 (0)