Skip to content

Commit 542d5be

Browse files
committed
use custom made up URI schema instead of tag URI for arbitrary URI $id tests (#797)
1 parent f7d27e6 commit 542d5be

File tree

5 files changed

+25
-25
lines changed

5 files changed

+25
-25
lines changed

tests/draft2019-09/ref.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -721,24 +721,24 @@
721721
]
722722
},
723723
{
724-
"description": "simple tag URI base URI with $ref via the tag URI",
724+
"description": "simple custom URI base URI with $ref via the custom URI",
725725
"schema": {
726726
"$comment": "URIs do not have to have HTTP(s) schemes",
727727
"$schema": "https://json-schema.org/draft/2020-12/schema",
728-
"$id": "tag:foo.example,2025:bar/baz",
728+
"$id": "foo:bar/baz",
729729
"minimum": 30,
730730
"properties": {
731-
"foo": {"$ref": "tag:foo.example,2025:bar/baz"}
731+
"foo": {"$ref": "foo:bar/baz"}
732732
}
733733
},
734734
"tests": [
735735
{
736-
"description": "valid under the tag URI IDed schema",
736+
"description": "valid under the custom URI IDed schema",
737737
"data": {"foo": 37},
738738
"valid": true
739739
},
740740
{
741-
"description": "invalid under the tag URI IDed schema",
741+
"description": "invalid under the custom URI IDed schema",
742742
"data": {"foo": 12},
743743
"valid": false
744744
}

tests/draft2020-12/ref.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -721,24 +721,24 @@
721721
]
722722
},
723723
{
724-
"description": "simple tag URI base URI with $ref via the tag URI",
724+
"description": "simple custom URI base URI with $ref via the custom URI",
725725
"schema": {
726726
"$comment": "URIs do not have to have HTTP(s) schemes",
727727
"$schema": "https://json-schema.org/draft/2020-12/schema",
728-
"$id": "tag:foo.example,2025:bar/baz",
728+
"$id": "foo:bar/baz",
729729
"minimum": 30,
730730
"properties": {
731-
"foo": {"$ref": "tag:foo.example,2025:bar/baz"}
731+
"foo": {"$ref": "foo:bar/baz"}
732732
}
733733
},
734734
"tests": [
735735
{
736-
"description": "valid under the tag URI IDed schema",
736+
"description": "valid under the custom URI IDed schema",
737737
"data": {"foo": 37},
738738
"valid": true
739739
},
740740
{
741-
"description": "invalid under the tag URI IDed schema",
741+
"description": "invalid under the custom URI IDed schema",
742742
"data": {"foo": 12},
743743
"valid": false
744744
}

tests/draft6/ref.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -660,24 +660,24 @@
660660
]
661661
},
662662
{
663-
"description": "simple tag URI base URI with $ref via the tag URI",
663+
"description": "simple custom URI base URI with $ref via the custom URI",
664664
"schema": {
665665
"$comment": "URIs do not have to have HTTP(s) schemes",
666666
"$schema": "https://json-schema.org/draft/2020-12/schema",
667-
"$id": "tag:foo.example,2025:bar/baz",
667+
"$id": "foo:bar/baz",
668668
"minimum": 30,
669669
"properties": {
670-
"foo": {"$ref": "tag:foo.example,2025:bar/baz"}
670+
"foo": {"$ref": "foo:bar/baz"}
671671
}
672672
},
673673
"tests": [
674674
{
675-
"description": "valid under the tag URI IDed schema",
675+
"description": "valid under the custom URI IDed schema",
676676
"data": {"foo": 37},
677677
"valid": true
678678
},
679679
{
680-
"description": "invalid under the tag URI IDed schema",
680+
"description": "invalid under the custom URI IDed schema",
681681
"data": {"foo": 12},
682682
"valid": false
683683
}

tests/draft7/ref.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -696,24 +696,24 @@
696696
]
697697
},
698698
{
699-
"description": "simple tag URI base URI with $ref via the tag URI",
699+
"description": "simple custom URI base URI with $ref via the custom URI",
700700
"schema": {
701701
"$comment": "URIs do not have to have HTTP(s) schemes",
702702
"$schema": "https://json-schema.org/draft/2020-12/schema",
703-
"$id": "tag:foo.example,2025:bar/baz",
703+
"$id": "foo:bar/baz",
704704
"minimum": 30,
705705
"properties": {
706-
"foo": {"$ref": "tag:foo.example,2025:bar/baz"}
706+
"foo": {"$ref": "foo:bar/baz"}
707707
}
708708
},
709709
"tests": [
710710
{
711-
"description": "valid under the tag URI IDed schema",
711+
"description": "valid under the custom URI IDed schema",
712712
"data": {"foo": 37},
713713
"valid": true
714714
},
715715
{
716-
"description": "invalid under the tag URI IDed schema",
716+
"description": "invalid under the custom URI IDed schema",
717717
"data": {"foo": 12},
718718
"valid": false
719719
}

tests/v1/ref.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -721,24 +721,24 @@
721721
]
722722
},
723723
{
724-
"description": "simple tag URI base URI with $ref via the tag URI",
724+
"description": "simple custom URI base URI with $ref via the custom URI",
725725
"schema": {
726726
"$comment": "URIs do not have to have HTTP(s) schemes",
727727
"$schema": "https://json-schema.org/draft/2020-12/schema",
728-
"$id": "tag:foo.example,2025:bar/baz",
728+
"$id": "foo:bar/baz",
729729
"minimum": 30,
730730
"properties": {
731-
"foo": {"$ref": "tag:foo.example,2025:bar/baz"}
731+
"foo": {"$ref": "foo:bar/baz"}
732732
}
733733
},
734734
"tests": [
735735
{
736-
"description": "valid under the tag URI IDed schema",
736+
"description": "valid under the custom URI IDed schema",
737737
"data": {"foo": 37},
738738
"valid": true
739739
},
740740
{
741-
"description": "invalid under the tag URI IDed schema",
741+
"description": "invalid under the custom URI IDed schema",
742742
"data": {"foo": 12},
743743
"valid": false
744744
}

0 commit comments

Comments
 (0)