Skip to content

Commit 0eb6893

Browse files
committed
draft-specific 2019-09 remotes, $refs, and $ids
1 parent c0ba85b commit 0eb6893

File tree

10 files changed

+64
-64
lines changed

10 files changed

+64
-64
lines changed

remotes/draft2019-09/extendible-dynamic-ref.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"description": "extendible array",
33
"$schema": "https://json-schema.org/draft/2019-09/schema",
4-
"$id": "http://localhost:1234/extendible-dynamic-ref.json",
4+
"$id": "http://localhost:1234/draft2019-09/extendible-dynamic-ref.json",
55
"type": "object",
66
"properties": {
77
"elements": {

remotes/draft2019-09/ref-and-definitions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://json-schema.org/draft/2019-09/schema",
3-
"$id": "http://localhost:1234/ref-and-definitions.json",
3+
"$id": "http://localhost:1234/draft2019-09/ref-and-definitions.json",
44
"definitions": {
55
"inner": {
66
"properties": {

remotes/draft2019-09/ref-and-defs.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://json-schema.org/draft/2019-09/schema",
3-
"$id": "http://localhost:1234/ref-and-defs.json",
3+
"$id": "http://localhost:1234/draft2019-09/ref-and-defs.json",
44
"$defs": {
55
"inner": {
66
"properties": {

remotes/draft2019-09/tree.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"description": "tree schema, extensible",
33
"$schema": "https://json-schema.org/draft/2019-09/schema",
4-
"$id": "http://localhost:1234/tree.json",
4+
"$id": "http://localhost:1234/draft2019-09/tree.json",
55
"$dynamicAnchor": "node",
66

77
"type": "object",

tests/draft2019-09/anchor.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
"description": "Location-independent identifier with absolute URI",
2929
"schema": {
3030
"$schema": "https://json-schema.org/draft/2019-09/schema",
31-
"$ref": "http://localhost:1234/bar#foo",
31+
"$ref": "http://localhost:1234/draft2019-09/bar#foo",
3232
"$defs": {
3333
"A": {
34-
"$id": "http://localhost:1234/bar",
34+
"$id": "http://localhost:1234/draft2019-09/bar",
3535
"$anchor": "foo",
3636
"type": "integer"
3737
}
@@ -54,8 +54,8 @@
5454
"description": "Location-independent identifier with base URI change in subschema",
5555
"schema": {
5656
"$schema": "https://json-schema.org/draft/2019-09/schema",
57-
"$id": "http://localhost:1234/root",
58-
"$ref": "http://localhost:1234/nested.json#foo",
57+
"$id": "http://localhost:1234/draft2019-09/root",
58+
"$ref": "http://localhost:1234/draft2019-09/nested.json#foo",
5959
"$defs": {
6060
"A": {
6161
"$id": "nested.json",
@@ -143,7 +143,7 @@
143143
"description": "same $anchor with different base uri",
144144
"schema": {
145145
"$schema": "https://json-schema.org/draft/2019-09/schema",
146-
"$id": "http://localhost:1234/foobar",
146+
"$id": "http://localhost:1234/draft2019-09/foobar",
147147
"$defs": {
148148
"A": {
149149
"$id": "child1",

tests/draft2019-09/id.json

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@
4444
{
4545
"description": "Identifier name with absolute URI",
4646
"data": {
47-
"$ref": "http://localhost:1234/bar#foo",
47+
"$ref": "http://localhost:1234/draft2019-09/bar#foo",
4848
"$defs": {
4949
"A": {
50-
"$id": "http://localhost:1234/bar#foo",
50+
"$id": "http://localhost:1234/draft2019-09/bar#foo",
5151
"type": "integer"
5252
}
5353
}
@@ -57,10 +57,10 @@
5757
{
5858
"description": "Identifier path with absolute URI",
5959
"data": {
60-
"$ref": "http://localhost:1234/bar#/a/b",
60+
"$ref": "http://localhost:1234/draft2019-09/bar#/a/b",
6161
"$defs": {
6262
"A": {
63-
"$id": "http://localhost:1234/bar#/a/b",
63+
"$id": "http://localhost:1234/draft2019-09/bar#/a/b",
6464
"type": "integer"
6565
}
6666
}
@@ -70,8 +70,8 @@
7070
{
7171
"description": "Identifier name with base URI change in subschema",
7272
"data": {
73-
"$id": "http://localhost:1234/root",
74-
"$ref": "http://localhost:1234/nested.json#foo",
73+
"$id": "http://localhost:1234/draft2019-09/root",
74+
"$ref": "http://localhost:1234/draft2019-09/nested.json#foo",
7575
"$defs": {
7676
"A": {
7777
"$id": "nested.json",
@@ -89,8 +89,8 @@
8989
{
9090
"description": "Identifier path with base URI change in subschema",
9191
"data": {
92-
"$id": "http://localhost:1234/root",
93-
"$ref": "http://localhost:1234/nested.json#/a/b",
92+
"$id": "http://localhost:1234/draft2019-09/root",
93+
"$ref": "http://localhost:1234/draft2019-09/nested.json#/a/b",
9494
"$defs": {
9595
"A": {
9696
"$id": "nested.json",
@@ -118,10 +118,10 @@
118118
{
119119
"description": "Identifier name with absolute URI",
120120
"data": {
121-
"$ref": "http://localhost:1234/bar",
121+
"$ref": "http://localhost:1234/draft2019-09/bar",
122122
"$defs": {
123123
"A": {
124-
"$id": "http://localhost:1234/bar#",
124+
"$id": "http://localhost:1234/draft2019-09/bar#",
125125
"type": "integer"
126126
}
127127
}
@@ -131,8 +131,8 @@
131131
{
132132
"description": "Identifier name with base URI change in subschema",
133133
"data": {
134-
"$id": "http://localhost:1234/root",
135-
"$ref": "http://localhost:1234/nested.json#/$defs/B",
134+
"$id": "http://localhost:1234/draft2019-09/root",
135+
"$ref": "http://localhost:1234/draft2019-09/nested.json#/$defs/B",
136136
"$defs": {
137137
"A": {
138138
"$id": "nested.json",
@@ -159,10 +159,10 @@
159159
{
160160
"description": "Unnormalized identifier",
161161
"data": {
162-
"$ref": "http://localhost:1234/foo/baz",
162+
"$ref": "http://localhost:1234/draft2019-09/foo/baz",
163163
"$defs": {
164164
"A": {
165-
"$id": "http://localhost:1234/foo/bar/../baz",
165+
"$id": "http://localhost:1234/draft2019-09/foo/bar/../baz",
166166
"type": "integer"
167167
}
168168
}
@@ -174,7 +174,7 @@
174174
"data": {
175175
"$defs": {
176176
"A": {
177-
"$id": "http://localhost:1234/foo/bar/../baz",
177+
"$id": "http://localhost:1234/draft2019-09/foo/bar/../baz",
178178
"type": "integer"
179179
}
180180
}
@@ -184,10 +184,10 @@
184184
{
185185
"description": "Unnormalized identifier with empty fragment",
186186
"data": {
187-
"$ref": "http://localhost:1234/foo/baz",
187+
"$ref": "http://localhost:1234/draft2019-09/foo/baz",
188188
"$defs": {
189189
"A": {
190-
"$id": "http://localhost:1234/foo/bar/../baz#",
190+
"$id": "http://localhost:1234/draft2019-09/foo/bar/../baz#",
191191
"type": "integer"
192192
}
193193
}
@@ -199,7 +199,7 @@
199199
"data": {
200200
"$defs": {
201201
"A": {
202-
"$id": "http://localhost:1234/foo/bar/../baz#",
202+
"$id": "http://localhost:1234/draft2019-09/foo/bar/../baz#",
203203
"type": "integer"
204204
}
205205
}
@@ -217,32 +217,32 @@
217217
"id_in_enum": {
218218
"enum": [
219219
{
220-
"$id": "https://localhost:1234/id/my_identifier.json",
220+
"$id": "https://localhost:1234/draft2019-09/id/my_identifier.json",
221221
"type": "null"
222222
}
223223
]
224224
},
225225
"real_id_in_schema": {
226-
"$id": "https://localhost:1234/id/my_identifier.json",
226+
"$id": "https://localhost:1234/draft2019-09/id/my_identifier.json",
227227
"type": "string"
228228
},
229229
"zzz_id_in_const": {
230230
"const": {
231-
"$id": "https://localhost:1234/id/my_identifier.json",
231+
"$id": "https://localhost:1234/draft2019-09/id/my_identifier.json",
232232
"type": "null"
233233
}
234234
}
235235
},
236236
"anyOf": [
237237
{ "$ref": "#/$defs/id_in_enum" },
238-
{ "$ref": "https://localhost:1234/id/my_identifier.json" }
238+
{ "$ref": "https://localhost:1234/draft2019-09/id/my_identifier.json" }
239239
]
240240
},
241241
"tests": [
242242
{
243243
"description": "exact match to enum, and type matches",
244244
"data": {
245-
"$id": "https://localhost:1234/id/my_identifier.json",
245+
"$id": "https://localhost:1234/draft2019-09/id/my_identifier.json",
246246
"type": "null"
247247
},
248248
"valid": true

tests/draft2019-09/recursiveRef.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"description": "$recursiveRef without using nesting",
3636
"schema": {
3737
"$schema": "https://json-schema.org/draft/2019-09/schema",
38-
"$id": "http://localhost:4242/recursiveRef2/schema.json",
38+
"$id": "http://localhost:4242/draft2019-09/recursiveRef2/schema.json",
3939
"$defs": {
4040
"myobject": {
4141
"$id": "myobject.json",
@@ -86,7 +86,7 @@
8686
"description": "$recursiveRef with nesting",
8787
"schema": {
8888
"$schema": "https://json-schema.org/draft/2019-09/schema",
89-
"$id": "http://localhost:4242/recursiveRef3/schema.json",
89+
"$id": "http://localhost:4242/draft2019-09/recursiveRef3/schema.json",
9090
"$recursiveAnchor": true,
9191
"$defs": {
9292
"myobject": {
@@ -138,7 +138,7 @@
138138
"description": "$recursiveRef with $recursiveAnchor: false works like $ref",
139139
"schema": {
140140
"$schema": "https://json-schema.org/draft/2019-09/schema",
141-
"$id": "http://localhost:4242/recursiveRef4/schema.json",
141+
"$id": "http://localhost:4242/draft2019-09/recursiveRef4/schema.json",
142142
"$recursiveAnchor": false,
143143
"$defs": {
144144
"myobject": {
@@ -190,7 +190,7 @@
190190
"description": "$recursiveRef with no $recursiveAnchor works like $ref",
191191
"schema": {
192192
"$schema": "https://json-schema.org/draft/2019-09/schema",
193-
"$id": "http://localhost:4242/recursiveRef5/schema.json",
193+
"$id": "http://localhost:4242/draft2019-09/recursiveRef5/schema.json",
194194
"$defs": {
195195
"myobject": {
196196
"$id": "myobject.json",
@@ -241,14 +241,14 @@
241241
"description": "$recursiveRef with no $recursiveAnchor in the initial target schema resource",
242242
"schema": {
243243
"$schema": "https://json-schema.org/draft/2019-09/schema",
244-
"$id": "http://localhost:4242/recursiveRef6/base.json",
244+
"$id": "http://localhost:4242/draft2019-09/recursiveRef6/base.json",
245245
"$recursiveAnchor": true,
246246
"anyOf": [
247247
{ "type": "boolean" },
248248
{
249249
"type": "object",
250250
"additionalProperties": {
251-
"$id": "http://localhost:4242/recursiveRef6/inner.json",
251+
"$id": "http://localhost:4242/draft2019-09/recursiveRef6/inner.json",
252252
"$comment": "there is no $recursiveAnchor: true here, so we do NOT recurse to the base",
253253
"anyOf": [
254254
{ "type": "integer" },
@@ -280,13 +280,13 @@
280280
"description": "$recursiveRef with no $recursiveAnchor in the outer schema resource",
281281
"schema": {
282282
"$schema": "https://json-schema.org/draft/2019-09/schema",
283-
"$id": "http://localhost:4242/recursiveRef7/base.json",
283+
"$id": "http://localhost:4242/draft2019-09/recursiveRef7/base.json",
284284
"anyOf": [
285285
{ "type": "boolean" },
286286
{
287287
"type": "object",
288288
"additionalProperties": {
289-
"$id": "http://localhost:4242/recursiveRef7/inner.json",
289+
"$id": "http://localhost:4242/draft2019-09/recursiveRef7/inner.json",
290290
"$recursiveAnchor": true,
291291
"anyOf": [
292292
{ "type": "integer" },

tests/draft2019-09/ref.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@
285285
"description": "Recursive references between schemas",
286286
"schema": {
287287
"$schema": "https://json-schema.org/draft/2019-09/schema",
288-
"$id": "http://localhost:1234/tree",
288+
"$id": "http://localhost:1234/draft2019-09/tree",
289289
"description": "tree of nodes",
290290
"type": "object",
291291
"properties": {
@@ -298,7 +298,7 @@
298298
"required": ["meta", "nodes"],
299299
"$defs": {
300300
"node": {
301-
"$id": "http://localhost:1234/node",
301+
"$id": "http://localhost:1234/draft2019-09/node",
302302
"description": "node",
303303
"type": "object",
304304
"properties": {
@@ -601,17 +601,17 @@
601601
"schema": {
602602
"$schema": "https://json-schema.org/draft/2019-09/schema",
603603
"$comment": "$id must be evaluated before $ref to get the proper $ref destination",
604-
"$id": "/ref-and-id1/base.json",
604+
"$id": "/draft2019-09/ref-and-id1/base.json",
605605
"$ref": "int.json",
606606
"$defs": {
607607
"bigint": {
608-
"$comment": "canonical uri: /ref-and-id1/int.json",
608+
"$comment": "canonical uri: /draft2019-09/ref-and-id1/int.json",
609609
"$id": "int.json",
610610
"maximum": 10
611611
},
612612
"smallint": {
613-
"$comment": "canonical uri: /ref-and-id1-int.json",
614-
"$id": "/ref-and-id1-int.json",
613+
"$comment": "canonical uri: /draft2019-09/ref-and-id1-int.json",
614+
"$id": "/draft2019-09/ref-and-id1-int.json",
615615
"maximum": 2
616616
}
617617
}
@@ -634,17 +634,17 @@
634634
"schema": {
635635
"$schema": "https://json-schema.org/draft/2019-09/schema",
636636
"$comment": "$id must be evaluated before $ref to get the proper $ref destination",
637-
"$id": "/ref-and-id2/base.json",
637+
"$id": "/draft2019-09/ref-and-id2/base.json",
638638
"$ref": "#bigint",
639639
"$defs": {
640640
"bigint": {
641-
"$comment": "canonical uri: /ref-and-id2/base.json/$defs/bigint; another valid uri for this location: /ref-and-id2/base.json#bigint",
641+
"$comment": "canonical uri: /draft2019-09/ref-and-id2/base.json/$defs/bigint; another valid uri for this location: /ref-and-id2/base.json#bigint",
642642
"$anchor": "bigint",
643643
"maximum": 10
644644
},
645645
"smallint": {
646-
"$comment": "canonical uri: /ref-and-id2#/$defs/smallint; another valid uri for this location: /ref-and-id2/#bigint",
647-
"$id": "/ref-and-id2/",
646+
"$comment": "canonical uri: /draft2019-09/ref-and-id2#/$defs/smallint; another valid uri for this location: /ref-and-id2/#bigint",
647+
"$id": "/draft2019-09/ref-and-id2/",
648648
"$anchor": "bigint",
649649
"maximum": 2
650650
}

0 commit comments

Comments
 (0)