File tree Expand file tree Collapse file tree 5 files changed +180
-0
lines changed Expand file tree Collapse file tree 5 files changed +180
-0
lines changed Original file line number Diff line number Diff line change 541
541
"valid" : true
542
542
}
543
543
]
544
+ },
545
+ {
546
+ "description" : " $id must be resolved against nearest parent, not just immediate parent" ,
547
+ "schema" : {
548
+ "$id" : " http://example.com/a.json" ,
549
+ "$defs" : {
550
+ "x" : {
551
+ "$id" : " http://example.com/b/c.json" ,
552
+ "not" : {
553
+ "$defs" : {
554
+ "y" : {
555
+ "$id" : " d.json" ,
556
+ "type" : " number"
557
+ }
558
+ }
559
+ }
560
+ }
561
+ },
562
+ "allOf" : [
563
+ {
564
+ "$ref" : " http://example.com/b/d.json"
565
+ }
566
+ ]
567
+ },
568
+ "tests" : [
569
+ {
570
+ "description" : " number should pass" ,
571
+ "data" : 1 ,
572
+ "valid" : true
573
+ },
574
+ {
575
+ "description" : " non-number should fail" ,
576
+ "data" : " a" ,
577
+ "valid" : false
578
+ }
579
+ ]
544
580
}
545
581
]
Original file line number Diff line number Diff line change 539
539
"valid" : true
540
540
}
541
541
]
542
+ },
543
+ {
544
+ "description" : " $id must be resolved against nearest parent, not just immediate parent" ,
545
+ "schema" : {
546
+ "$id" : " http://example.com/a.json" ,
547
+ "$defs" : {
548
+ "x" : {
549
+ "$id" : " http://example.com/b/c.json" ,
550
+ "not" : {
551
+ "$defs" : {
552
+ "y" : {
553
+ "$id" : " d.json" ,
554
+ "type" : " number"
555
+ }
556
+ }
557
+ }
558
+ }
559
+ },
560
+ "allOf" : [
561
+ {
562
+ "$ref" : " http://example.com/b/d.json"
563
+ }
564
+ ]
565
+ },
566
+ "tests" : [
567
+ {
568
+ "description" : " number should pass" ,
569
+ "data" : 1 ,
570
+ "valid" : true
571
+ },
572
+ {
573
+ "description" : " non-number should fail" ,
574
+ "data" : " a" ,
575
+ "valid" : false
576
+ }
577
+ ]
542
578
}
543
579
]
Original file line number Diff line number Diff line change 541
541
"valid" : true
542
542
}
543
543
]
544
+ },
545
+ {
546
+ "description" : " $id must be resolved against nearest parent, not just immediate parent" ,
547
+ "schema" : {
548
+ "$id" : " http://example.com/a.json" ,
549
+ "$defs" : {
550
+ "x" : {
551
+ "$id" : " http://example.com/b/c.json" ,
552
+ "not" : {
553
+ "$defs" : {
554
+ "y" : {
555
+ "$id" : " d.json" ,
556
+ "type" : " number"
557
+ }
558
+ }
559
+ }
560
+ }
561
+ },
562
+ "allOf" : [
563
+ {
564
+ "$ref" : " http://example.com/b/d.json"
565
+ }
566
+ ]
567
+ },
568
+ "tests" : [
569
+ {
570
+ "description" : " number should pass" ,
571
+ "data" : 1 ,
572
+ "valid" : true
573
+ },
574
+ {
575
+ "description" : " non-number should fail" ,
576
+ "data" : " a" ,
577
+ "valid" : false
578
+ }
579
+ ]
544
580
}
545
581
]
Original file line number Diff line number Diff line change 467
467
"valid" : true
468
468
}
469
469
]
470
+ },
471
+ {
472
+ "description" : " id must be resolved against nearest parent, not just immediate parent" ,
473
+ "schema" : {
474
+ "id" : " http://example.com/a.json" ,
475
+ "definitions" : {
476
+ "x" : {
477
+ "id" : " http://example.com/b/c.json" ,
478
+ "not" : {
479
+ "definitions" : {
480
+ "y" : {
481
+ "id" : " d.json" ,
482
+ "type" : " number"
483
+ }
484
+ }
485
+ }
486
+ }
487
+ },
488
+ "allOf" : [
489
+ {
490
+ "$ref" : " http://example.com/b/d.json"
491
+ }
492
+ ]
493
+ },
494
+ "tests" : [
495
+ {
496
+ "description" : " number should pass" ,
497
+ "data" : 1 ,
498
+ "valid" : true
499
+ },
500
+ {
501
+ "description" : " non-number should fail" ,
502
+ "data" : " a" ,
503
+ "valid" : false
504
+ }
505
+ ]
470
506
}
471
507
]
Original file line number Diff line number Diff line change 608
608
"valid" : true
609
609
}
610
610
]
611
+ },
612
+ {
613
+ "description" : " $id must be resolved against nearest parent, not just immediate parent" ,
614
+ "schema" : {
615
+ "$id" : " http://example.com/a.json" ,
616
+ "definitions" : {
617
+ "x" : {
618
+ "$id" : " http://example.com/b/c.json" ,
619
+ "not" : {
620
+ "definitions" : {
621
+ "y" : {
622
+ "$id" : " d.json" ,
623
+ "type" : " number"
624
+ }
625
+ }
626
+ }
627
+ }
628
+ },
629
+ "allOf" : [
630
+ {
631
+ "$ref" : " http://example.com/b/d.json"
632
+ }
633
+ ]
634
+ },
635
+ "tests" : [
636
+ {
637
+ "description" : " number should pass" ,
638
+ "data" : 1 ,
639
+ "valid" : true
640
+ },
641
+ {
642
+ "description" : " non-number should fail" ,
643
+ "data" : " a" ,
644
+ "valid" : false
645
+ }
646
+ ]
611
647
}
612
648
]
You can’t perform that action at this time.
0 commit comments