Skip to content

Commit e157bc0

Browse files
karenetheridgeJulian
authored andcommitted
squash: use a unique $id to prevent namespace collisions across tests
1 parent 1d5583d commit e157bc0

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

tests/draft2019-09/ref.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -580,17 +580,17 @@
580580
"description": "order of evaluation: $id and $ref",
581581
"schema": {
582582
"$comment": "$id must be evaluated before $ref to get the proper $ref destination",
583-
"$id": "/base/base.json",
583+
"$id": "/ref-and-id1/base.json",
584584
"$ref": "int.json",
585585
"$defs": {
586586
"bigint": {
587-
"$comment": "canonical uri: /base/int.json",
587+
"$comment": "canonical uri: /ref-and-id1/int.json",
588588
"$id": "int.json",
589589
"maximum": 10
590590
},
591591
"smallint": {
592-
"$comment": "canonical uri: /int.json",
593-
"$id": "/int.json",
592+
"$comment": "canonical uri: /ref-and-id1-int.json",
593+
"$id": "/ref-and-id1-int.json",
594594
"maximum": 2
595595
}
596596
}
@@ -612,17 +612,17 @@
612612
"description": "order of evaluation: $id and $anchor and $ref",
613613
"schema": {
614614
"$comment": "$id must be evaluated before $ref to get the proper $ref destination",
615-
"$id": "/base.json",
615+
"$id": "/ref-and-id2/base.json",
616616
"$ref": "#bigint",
617617
"$defs": {
618618
"bigint": {
619-
"$comment": "canonical uri: /base.json#/$defs/bigint; another valid uri for this location: /base.json#bigint",
619+
"$comment": "canonical uri: /ref-and-id2/base.json/$defs/bigint; another valid uri for this location: /ref-and-id2/base.json#bigint",
620620
"$anchor": "bigint",
621621
"maximum": 10
622622
},
623623
"smallint": {
624-
"$comment": "canonical uri: /#/$defs/smallint; another valid uri for this location: /#bigint",
625-
"$id": "/",
624+
"$comment": "canonical uri: /ref-and-id2#/$defs/smallint; another valid uri for this location: /ref-and-id2/#bigint",
625+
"$id": "/ref-and-id2/",
626626
"$anchor": "bigint",
627627
"maximum": 2
628628
}

tests/draft7/ref.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -649,17 +649,17 @@
649649
"description": "order of evaluation: $id and $ref",
650650
"schema": {
651651
"$comment": "$id must be evaluated before $ref to get the proper $ref destination",
652-
"$id": "/base/base.json",
652+
"$id": "/ref-and-id1/base.json",
653653
"$ref": "int.json",
654654
"$defs": {
655655
"bigint": {
656-
"$comment": "canonical uri: /base/int.json",
656+
"$comment": "canonical uri: /ref-and-id1/int.json",
657657
"$id": "int.json",
658658
"maximum": 10
659659
},
660660
"smallint": {
661-
"$comment": "canonical uri: /int.json",
662-
"$id": "/int.json",
661+
"$comment": "canonical uri: /ref-and-id1-int.json",
662+
"$id": "/ref-and-id1-int.json",
663663
"maximum": 2
664664
}
665665
}
@@ -678,19 +678,19 @@
678678
]
679679
},
680680
{
681-
"description": "order of evaluation: plain-name $id and $ref",
681+
"description": "order of evaluation: $id and $anchor and $ref",
682682
"schema": {
683683
"$comment": "$id must be evaluated before $ref to get the proper $ref destination",
684-
"$id": "/base.json",
684+
"$id": "/ref-and-id2/base.json",
685685
"$ref": "#bigint",
686686
"$defs": {
687687
"bigint": {
688-
"$comment": "canonical uri: /base.json#/$defs/bigint; another valid uri for this location: /base.json#bigint",
688+
"$comment": "canonical uri: /ref-and-id2/base.json/$defs/bigint; another valid uri for this location: /ref-and-id2/base.json#bigint",
689689
"$id": "#bigint",
690690
"maximum": 10
691691
},
692692
"smallint": {
693-
"$comment": "canonical uri: /#/$defs/smallint; another valid uri for this location: /#bigint",
693+
"$comment": "canonical uri: /ref-and-id2#/$defs/smallint; another valid uri for this location: /ref-and-id2/#bigint",
694694
"$id": "/#bigint",
695695
"maximum": 2
696696
}

0 commit comments

Comments
 (0)