|
44 | 44 | { |
45 | 45 | "description": "Identifier name with absolute URI", |
46 | 46 | "data": { |
47 | | - "$ref": "http://localhost:1234/bar#foo", |
| 47 | + "$ref": "http://localhost:1234/draft2020-12/bar#foo", |
48 | 48 | "$defs": { |
49 | 49 | "A": { |
50 | | - "$id": "http://localhost:1234/bar#foo", |
| 50 | + "$id": "http://localhost:1234/draft2020-12/bar#foo", |
51 | 51 | "type": "integer" |
52 | 52 | } |
53 | 53 | } |
|
57 | 57 | { |
58 | 58 | "description": "Identifier path with absolute URI", |
59 | 59 | "data": { |
60 | | - "$ref": "http://localhost:1234/bar#/a/b", |
| 60 | + "$ref": "http://localhost:1234/draft2020-12/bar#/a/b", |
61 | 61 | "$defs": { |
62 | 62 | "A": { |
63 | | - "$id": "http://localhost:1234/bar#/a/b", |
| 63 | + "$id": "http://localhost:1234/draft2020-12/bar#/a/b", |
64 | 64 | "type": "integer" |
65 | 65 | } |
66 | 66 | } |
|
70 | 70 | { |
71 | 71 | "description": "Identifier name with base URI change in subschema", |
72 | 72 | "data": { |
73 | | - "$id": "http://localhost:1234/root", |
74 | | - "$ref": "http://localhost:1234/nested.json#foo", |
| 73 | + "$id": "http://localhost:1234/draft2020-12/root", |
| 74 | + "$ref": "http://localhost:1234/draft2020-12/nested.json#foo", |
75 | 75 | "$defs": { |
76 | 76 | "A": { |
77 | 77 | "$id": "nested.json", |
|
89 | 89 | { |
90 | 90 | "description": "Identifier path with base URI change in subschema", |
91 | 91 | "data": { |
92 | | - "$id": "http://localhost:1234/root", |
93 | | - "$ref": "http://localhost:1234/nested.json#/a/b", |
| 92 | + "$id": "http://localhost:1234/draft2020-12/root", |
| 93 | + "$ref": "http://localhost:1234/draft2020-12/nested.json#/a/b", |
94 | 94 | "$defs": { |
95 | 95 | "A": { |
96 | 96 | "$id": "nested.json", |
|
118 | 118 | { |
119 | 119 | "description": "Identifier name with absolute URI", |
120 | 120 | "data": { |
121 | | - "$ref": "http://localhost:1234/bar", |
| 121 | + "$ref": "http://localhost:1234/draft2020-12/bar", |
122 | 122 | "$defs": { |
123 | 123 | "A": { |
124 | | - "$id": "http://localhost:1234/bar#", |
| 124 | + "$id": "http://localhost:1234/draft2020-12/bar#", |
125 | 125 | "type": "integer" |
126 | 126 | } |
127 | 127 | } |
|
131 | 131 | { |
132 | 132 | "description": "Identifier name with base URI change in subschema", |
133 | 133 | "data": { |
134 | | - "$id": "http://localhost:1234/root", |
135 | | - "$ref": "http://localhost:1234/nested.json#/$defs/B", |
| 134 | + "$id": "http://localhost:1234/draft2020-12/root", |
| 135 | + "$ref": "http://localhost:1234/draft2020-12/nested.json#/$defs/B", |
136 | 136 | "$defs": { |
137 | 137 | "A": { |
138 | 138 | "$id": "nested.json", |
|
159 | 159 | { |
160 | 160 | "description": "Unnormalized identifier", |
161 | 161 | "data": { |
162 | | - "$ref": "http://localhost:1234/foo/baz", |
| 162 | + "$ref": "http://localhost:1234/draft2020-12/foo/baz", |
163 | 163 | "$defs": { |
164 | 164 | "A": { |
165 | | - "$id": "http://localhost:1234/foo/bar/../baz", |
| 165 | + "$id": "http://localhost:1234/draft2020-12/foo/bar/../baz", |
166 | 166 | "type": "integer" |
167 | 167 | } |
168 | 168 | } |
|
174 | 174 | "data": { |
175 | 175 | "$defs": { |
176 | 176 | "A": { |
177 | | - "$id": "http://localhost:1234/foo/bar/../baz", |
| 177 | + "$id": "http://localhost:1234/draft2020-12/foo/bar/../baz", |
178 | 178 | "type": "integer" |
179 | 179 | } |
180 | 180 | } |
|
184 | 184 | { |
185 | 185 | "description": "Unnormalized identifier with empty fragment", |
186 | 186 | "data": { |
187 | | - "$ref": "http://localhost:1234/foo/baz", |
| 187 | + "$ref": "http://localhost:1234/draft2020-12/foo/baz", |
188 | 188 | "$defs": { |
189 | 189 | "A": { |
190 | | - "$id": "http://localhost:1234/foo/bar/../baz#", |
| 190 | + "$id": "http://localhost:1234/draft2020-12/foo/bar/../baz#", |
191 | 191 | "type": "integer" |
192 | 192 | } |
193 | 193 | } |
|
199 | 199 | "data": { |
200 | 200 | "$defs": { |
201 | 201 | "A": { |
202 | | - "$id": "http://localhost:1234/foo/bar/../baz#", |
| 202 | + "$id": "http://localhost:1234/draft2020-12/foo/bar/../baz#", |
203 | 203 | "type": "integer" |
204 | 204 | } |
205 | 205 | } |
|
217 | 217 | "id_in_enum": { |
218 | 218 | "enum": [ |
219 | 219 | { |
220 | | - "$id": "https://localhost:1234/id/my_identifier.json", |
| 220 | + "$id": "https://localhost:1234/draft2020-12/id/my_identifier.json", |
221 | 221 | "type": "null" |
222 | 222 | } |
223 | 223 | ] |
224 | 224 | }, |
225 | 225 | "real_id_in_schema": { |
226 | | - "$id": "https://localhost:1234/id/my_identifier.json", |
| 226 | + "$id": "https://localhost:1234/draft2020-12/id/my_identifier.json", |
227 | 227 | "type": "string" |
228 | 228 | }, |
229 | 229 | "zzz_id_in_const": { |
230 | 230 | "const": { |
231 | | - "$id": "https://localhost:1234/id/my_identifier.json", |
| 231 | + "$id": "https://localhost:1234/draft2020-12/id/my_identifier.json", |
232 | 232 | "type": "null" |
233 | 233 | } |
234 | 234 | } |
235 | 235 | }, |
236 | 236 | "anyOf": [ |
237 | 237 | { "$ref": "#/$defs/id_in_enum" }, |
238 | | - { "$ref": "https://localhost:1234/id/my_identifier.json" } |
| 238 | + { "$ref": "https://localhost:1234/draft2020-12/id/my_identifier.json" } |
239 | 239 | ] |
240 | 240 | }, |
241 | 241 | "tests": [ |
242 | 242 | { |
243 | 243 | "description": "exact match to enum, and type matches", |
244 | 244 | "data": { |
245 | | - "$id": "https://localhost:1234/id/my_identifier.json", |
| 245 | + "$id": "https://localhost:1234/draft2020-12/id/my_identifier.json", |
246 | 246 | "type": "null" |
247 | 247 | }, |
248 | 248 | "valid": true |
|
0 commit comments