|
1 | 1 | {
|
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", |
4 | 4 | "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 |
| - }, |
109 | 5 | "definitions": {
|
110 | 6 | "schemaArray": {
|
111 | 7 | "type": "array",
|
112 |
| - "items": { |
113 |
| - "$ref": "#" |
114 |
| - } |
| 8 | + "items": { "$ref": "#" } |
115 | 9 | },
|
116 | 10 | "linkDescription": {
|
117 | 11 | "title": "Link Description Object",
|
118 | 12 | "type": "object",
|
119 |
| - "required": [ "href", "rel" ], |
| 13 | + "required": [ "href"], |
120 | 14 | "properties": {
|
121 | 15 | "href": {
|
122 |
| - "description": "a URI template, as defined by RFC 6570, with the addition of the $, ( and ) characters for pre-processing", |
123 | 16 | "type": "string"
|
124 | 17 | },
|
125 | 18 | "rel": {
|
126 |
| - "description": "relation to the target resource of the link", |
127 | 19 | "type": "string"
|
128 | 20 | },
|
129 | 21 | "title": {
|
130 |
| - "description": "a title for the link", |
131 | 22 | "type": "string"
|
132 | 23 | },
|
133 |
| - "targetSchema": { |
134 |
| - "description": "JSON Schema describing the link target", |
135 |
| - "$ref": "#" |
136 |
| - }, |
| 24 | + "targetSchema": { "$ref": "#" }, |
137 | 25 | "mediaType": {
|
138 |
| - "description": "media type (as defined by RFC 2046) describing the link target", |
139 | 26 | "type": "string"
|
140 | 27 | },
|
141 | 28 | "method": {
|
142 |
| - "description": "method for requesting the target of the link (e.g. for HTTP this might be \"GET\" or \"DELETE\")", |
143 | 29 | "type": "string"
|
144 | 30 | },
|
145 | 31 | "encType": {
|
146 |
| - "description": "The media type in which to submit data along with the request", |
147 | 32 | "type": "string",
|
148 | 33 | "default": "application/json"
|
149 | 34 | },
|
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 | + } |
153 | 97 | }
|
154 | 98 | }
|
155 | 99 | }
|
156 | 100 | },
|
| 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 | + ], |
157 | 108 | "links": [
|
158 | 109 | {
|
159 | 110 | "rel": "self",
|
|
0 commit comments