Skip to content

Commit d7739d3

Browse files
committed
Move hyper-schema definitions to top.
This brings it in line with the core/validation meta-schema and with the standardized format proposed for Draft 05.
1 parent 464abb8 commit d7739d3

File tree

1 file changed

+50
-50
lines changed

1 file changed

+50
-50
lines changed

hyper-schema.json

+50-50
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,56 @@
22
"$schema": "http://json-schema.org/draft/hyper-schema#",
33
"id": "http://json-schema.org/draft/hyper-schema#",
44
"title": "JSON Hyper-Schema",
5+
"definitions": {
6+
"schemaArray": {
7+
"allOf": [
8+
{ "$ref": "http://json-schema.org/drafts/schema" },
9+
{
10+
"items": { "$ref": "#" }
11+
}
12+
]
13+
},
14+
"linkDescription": {
15+
"title": "Link Description Object",
16+
"type": "object",
17+
"required": [ "href" ],
18+
"properties": {
19+
"href": {
20+
"description": "a URI template, as defined by RFC 6570, with the addition of the $, ( and ) characters for pre-processing",
21+
"type": "string"
22+
},
23+
"rel": {
24+
"description": "relation to the target resource of the link",
25+
"type": "string"
26+
},
27+
"title": {
28+
"description": "a title for the link",
29+
"type": "string"
30+
},
31+
"targetSchema": {
32+
"description": "JSON Schema describing the link target",
33+
"allOf": [ { "$ref": "#" } ]
34+
},
35+
"mediaType": {
36+
"description": "media type (as defined by RFC 2046) describing the link target",
37+
"type": "string"
38+
},
39+
"method": {
40+
"description": "specifies that the client can construct a templated query (\"get\") or non-idempotent request (\"post\") to a resource.",
41+
"type": "string"
42+
},
43+
"encType": {
44+
"description": "The media type in which to submit data along with the request",
45+
"type": "string",
46+
"default": "application/json"
47+
},
48+
"schema": {
49+
"description": "Schema describing the data to submit along with the request",
50+
"allOf": [ { "$ref": "#" } ]
51+
}
52+
}
53+
}
54+
},
555
"allOf": [ { "$ref": "http://json-schema.org/draft/schema#" } ],
656
"properties": {
757
"additionalItems": {
@@ -71,56 +121,6 @@
71121
"default": "false"
72122
}
73123
},
74-
"definitions": {
75-
"schemaArray": {
76-
"allOf": [
77-
{ "$ref": "http://json-schema.org/drafts/schema" },
78-
{
79-
"items": { "$ref": "#" }
80-
}
81-
]
82-
},
83-
"linkDescription": {
84-
"title": "Link Description Object",
85-
"type": "object",
86-
"required": [ "href" ],
87-
"properties": {
88-
"href": {
89-
"description": "a URI template, as defined by RFC 6570, with the addition of the $, ( and ) characters for pre-processing",
90-
"type": "string"
91-
},
92-
"rel": {
93-
"description": "relation to the target resource of the link",
94-
"type": "string"
95-
},
96-
"title": {
97-
"description": "a title for the link",
98-
"type": "string"
99-
},
100-
"targetSchema": {
101-
"description": "JSON Schema describing the link target",
102-
"allOf": [ { "$ref": "#" } ]
103-
},
104-
"mediaType": {
105-
"description": "media type (as defined by RFC 2046) describing the link target",
106-
"type": "string"
107-
},
108-
"method": {
109-
"description": "specifies that the client can construct a templated query (\"get\") or non-idempotent request (\"post\") to a resource.",
110-
"type": "string"
111-
},
112-
"encType": {
113-
"description": "The media type in which to submit data along with the request",
114-
"type": "string",
115-
"default": "application/json"
116-
},
117-
"schema": {
118-
"description": "Schema describing the data to submit along with the request",
119-
"allOf": [ { "$ref": "#" } ]
120-
}
121-
}
122-
}
123-
},
124124
"links": [
125125
{
126126
"rel": "self",

0 commit comments

Comments
 (0)