Skip to content

Commit e760666

Browse files
squash: use a unique $id to prevent namespace collisions across tests
1 parent 9d0c502 commit e760666

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

tests/draft2019-09/ref.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -387,17 +387,17 @@
387387
"description": "order of evaluation: $id and $ref",
388388
"schema": {
389389
"$comment": "$id must be evaluated before $ref to get the proper $ref destination",
390-
"$id": "/base/base.json",
390+
"$id": "/ref-and-id1/base.json",
391391
"$ref": "int.json",
392392
"$defs": {
393393
"bigint": {
394-
"$comment": "canonical uri: /base/int.json",
394+
"$comment": "canonical uri: /ref-and-id1/int.json",
395395
"$id": "int.json",
396396
"maximum": 10
397397
},
398398
"smallint": {
399-
"$comment": "canonical uri: /int.json",
400-
"$id": "/int.json",
399+
"$comment": "canonical uri: /ref-and-id1-int.json",
400+
"$id": "/ref-and-id1-int.json",
401401
"maximum": 2
402402
}
403403
}
@@ -419,17 +419,17 @@
419419
"description": "order of evaluation: $id and $anchor and $ref",
420420
"schema": {
421421
"$comment": "$id must be evaluated before $ref to get the proper $ref destination",
422-
"$id": "/base.json",
422+
"$id": "/ref-and-id2/base.json",
423423
"$ref": "#bigint",
424424
"$defs": {
425425
"bigint": {
426-
"$comment": "canonical uri: /base.json#/$defs/bigint; another valid uri for this location: /base.json#bigint",
426+
"$comment": "canonical uri: /ref-and-id2/base.json/$defs/bigint; another valid uri for this location: /ref-and-id2/base.json#bigint",
427427
"$anchor": "bigint",
428428
"maximum": 10
429429
},
430430
"smallint": {
431-
"$comment": "canonical uri: /#/$defs/smallint; another valid uri for this location: /#bigint",
432-
"$id": "/",
431+
"$comment": "canonical uri: /ref-and-id2#/$defs/smallint; another valid uri for this location: /ref-and-id2/#bigint",
432+
"$id": "/ref-and-id2/",
433433
"$anchor": "bigint",
434434
"maximum": 2
435435
}

tests/draft7/ref.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -444,17 +444,17 @@
444444
"description": "order of evaluation: $id and $ref",
445445
"schema": {
446446
"$comment": "$id must be evaluated before $ref to get the proper $ref destination",
447-
"$id": "/base/base.json",
447+
"$id": "/ref-and-id1/base.json",
448448
"$ref": "int.json",
449449
"$defs": {
450450
"bigint": {
451-
"$comment": "canonical uri: /base/int.json",
451+
"$comment": "canonical uri: /ref-and-id1/int.json",
452452
"$id": "int.json",
453453
"maximum": 10
454454
},
455455
"smallint": {
456-
"$comment": "canonical uri: /int.json",
457-
"$id": "/int.json",
456+
"$comment": "canonical uri: /ref-and-id1-int.json",
457+
"$id": "/ref-and-id1-int.json",
458458
"maximum": 2
459459
}
460460
}
@@ -473,19 +473,19 @@
473473
]
474474
},
475475
{
476-
"description": "order of evaluation: plain-name $id and $ref",
476+
"description": "order of evaluation: $id and $anchor and $ref",
477477
"schema": {
478478
"$comment": "$id must be evaluated before $ref to get the proper $ref destination",
479-
"$id": "/base.json",
479+
"$id": "/ref-and-id2/base.json",
480480
"$ref": "#bigint",
481481
"$defs": {
482482
"bigint": {
483-
"$comment": "canonical uri: /base.json#/$defs/bigint; another valid uri for this location: /base.json#bigint",
483+
"$comment": "canonical uri: /ref-and-id2/base.json/$defs/bigint; another valid uri for this location: /ref-and-id2/base.json#bigint",
484484
"$id": "#bigint",
485485
"maximum": 10
486486
},
487487
"smallint": {
488-
"$comment": "canonical uri: /#/$defs/smallint; another valid uri for this location: /#bigint",
488+
"$comment": "canonical uri: /ref-and-id2#/$defs/smallint; another valid uri for this location: /ref-and-id2/#bigint",
489489
"$id": "/#bigint",
490490
"maximum": 2
491491
}

0 commit comments

Comments
 (0)