Skip to content

Commit cf76770

Browse files
committed
Make all root $ids absolute URIs
1 parent 9beb3cf commit cf76770

File tree

4 files changed

+20
-20
lines changed

4 files changed

+20
-20
lines changed

tests/draft-next/ref.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -601,16 +601,16 @@
601601
"schema": {
602602
"$schema": "https://json-schema.org/draft/next/schema",
603603
"$comment": "$id must be evaluated before $ref to get the proper $ref destination",
604-
"$id": "/draft/next/ref-and-id1/base.json",
604+
"$id": "https://example.com/draft/next/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: https://example.com/ref-and-id1/int.json",
609609
"$id": "int.json",
610610
"maximum": 10
611611
},
612612
"smallint": {
613-
"$comment": "canonical uri: /ref-and-id1-int.json",
613+
"$comment": "canonical uri: https://example.com/ref-and-id1-int.json",
614614
"$id": "/draft/next/ref-and-id1-int.json",
615615
"maximum": 2
616616
}
@@ -634,16 +634,16 @@
634634
"schema": {
635635
"$schema": "https://json-schema.org/draft/next/schema",
636636
"$comment": "$id must be evaluated before $ref to get the proper $ref destination",
637-
"$id": "/draft/next/ref-and-id2/base.json",
637+
"$id": "https://example.com/draft/next/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: https://example.com/ref-and-id2/base.json#/$defs/bigint; another valid uri for this location: https://example.com/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",
646+
"$comment": "canonical uri: https://example.com/ref-and-id2#/$defs/smallint; another valid uri for this location: https://example.com/ref-and-id2/#bigint",
647647
"$id": "/draft/next/ref-and-id2/",
648648
"$anchor": "bigint",
649649
"maximum": 2

tests/draft2019-09/recursiveRef.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@
318318
"description": "multiple dynamic paths to the $recursiveRef keyword",
319319
"schema": {
320320
"$schema": "https://json-schema.org/draft/2019-09/schema",
321-
"$id": "recursiveRef8_main.json",
321+
"$id": "https://example.com/recursiveRef8_main.json",
322322
"$defs": {
323323
"inner": {
324324
"$id": "recursiveRef8_inner.json",
@@ -365,7 +365,7 @@
365365
"description": "dynamic $recursiveRef destination (not predictable at schema compile time)",
366366
"schema": {
367367
"$schema": "https://json-schema.org/draft/2019-09/schema",
368-
"$id": "main.json",
368+
"$id": "https://example.com/main.json",
369369
"$defs": {
370370
"inner": {
371371
"$id": "inner.json",

tests/draft2019-09/ref.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -601,16 +601,16 @@
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": "/draft2019-09/ref-and-id1/base.json",
604+
"$id": "https://example.com/draft2019-09/ref-and-id1/base.json",
605605
"$ref": "int.json",
606606
"$defs": {
607607
"bigint": {
608-
"$comment": "canonical uri: /draft2019-09/ref-and-id1/int.json",
608+
"$comment": "canonical uri: https://example.com/draft2019-09/ref-and-id1/int.json",
609609
"$id": "int.json",
610610
"maximum": 10
611611
},
612612
"smallint": {
613-
"$comment": "canonical uri: /draft2019-09/ref-and-id1-int.json",
613+
"$comment": "canonical uri: https://example.com/draft2019-09/ref-and-id1-int.json",
614614
"$id": "/draft2019-09/ref-and-id1-int.json",
615615
"maximum": 2
616616
}
@@ -634,16 +634,16 @@
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": "/draft2019-09/ref-and-id2/base.json",
637+
"$id": "https://example.com/draft2019-09/ref-and-id2/base.json",
638638
"$ref": "#bigint",
639639
"$defs": {
640640
"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",
641+
"$comment": "canonical uri: https://example.com/draft2019-09/ref-and-id2/base.json#/$defs/bigint; another valid uri for this location: https://example.com/ref-and-id2/base.json#bigint",
642642
"$anchor": "bigint",
643643
"maximum": 10
644644
},
645645
"smallint": {
646-
"$comment": "canonical uri: /draft2019-09/ref-and-id2#/$defs/smallint; another valid uri for this location: /ref-and-id2/#bigint",
646+
"$comment": "canonical uri: https://example.com/draft2019-09/ref-and-id2#/$defs/smallint; another valid uri for this location: https://example.com/ref-and-id2/#bigint",
647647
"$id": "/draft2019-09/ref-and-id2/",
648648
"$anchor": "bigint",
649649
"maximum": 2

tests/draft2020-12/ref.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -601,16 +601,16 @@
601601
"schema": {
602602
"$comment": "$id must be evaluated before $ref to get the proper $ref destination",
603603
"$schema": "https://json-schema.org/draft/2020-12/schema",
604-
"$id": "/draft2020-12/ref-and-id1/base.json",
604+
"$id": "https://example.com/draft2020-12/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: https://example.com/ref-and-id1/int.json",
609609
"$id": "int.json",
610610
"maximum": 10
611611
},
612612
"smallint": {
613-
"$comment": "canonical uri: /ref-and-id1-int.json",
613+
"$comment": "canonical uri: https://example.com/ref-and-id1-int.json",
614614
"$id": "/draft2020-12/ref-and-id1-int.json",
615615
"maximum": 2
616616
}
@@ -634,7 +634,7 @@
634634
"schema": {
635635
"$comment": "$id must be evaluated before $ref to get the proper $ref destination",
636636
"$schema": "https://json-schema.org/draft/2020-12/schema",
637-
"$id": "/draft2020-12/ref-and-id2/base.json",
637+
"$id": "https://example.com/draft2020-12/ref-and-id2/base.json",
638638
"$ref": "#bigint",
639639
"$defs": {
640640
"bigint": {
@@ -643,8 +643,8 @@
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": "/draft2020-12/ref-and-id2/",
646+
"$comment": "canonical uri: https://example.com/ref-and-id2#/$defs/smallint; another valid uri for this location: https://example.com/ref-and-id2/#bigint",
647+
"$id": "https://example.com/draft2020-12/ref-and-id2/",
648648
"$anchor": "bigint",
649649
"maximum": 2
650650
}

0 commit comments

Comments
 (0)