File tree Expand file tree Collapse file tree 3 files changed +99
-0
lines changed Expand file tree Collapse file tree 3 files changed +99
-0
lines changed Original file line number Diff line number Diff line change 663663 }
664664 ]
665665 },
666+ {
667+ "description" : " order of evaluation: $id and $ref on nested schema" ,
668+ "schema" : {
669+ "$comment" : " $id must be evaluated before $ref to get the proper $ref destination" ,
670+ "$schema" : " https://json-schema.org/draft/2019-09/schema" ,
671+ "$id" : " https://example.com/draft2019-09/ref-and-id3/base.json" ,
672+ "$ref" : " nested/foo.json" ,
673+ "$defs" : {
674+ "foo" : {
675+ "$comment" : " canonical uri: https://example.com/draft2019-09/ref-and-id3/nested/foo.json" ,
676+ "$id" : " nested/foo.json" ,
677+ "$ref" : " ./bar.json"
678+ },
679+ "bar" : {
680+ "$comment" : " canonical uri: https://example.com/draft2019-09/ref-and-id3/nested/bar.json" ,
681+ "$id" : " nested/bar.json" ,
682+ "type" : " number"
683+ }
684+ }
685+ },
686+ "tests" : [
687+ {
688+ "description" : " data is valid against nested sibling" ,
689+ "data" : 5 ,
690+ "valid" : true
691+ },
692+ {
693+ "description" : " data is invalid against nested sibling" ,
694+ "data" : " a" ,
695+ "valid" : false
696+ }
697+ ]
698+ },
666699 {
667700 "description" : " simple URN base URI with $ref via the URN" ,
668701 "schema" : {
Original file line number Diff line number Diff line change 663663 }
664664 ]
665665 },
666+ {
667+ "description" : " order of evaluation: $id and $ref on nested schema" ,
668+ "schema" : {
669+ "$comment" : " $id must be evaluated before $ref to get the proper $ref destination" ,
670+ "$schema" : " https://json-schema.org/draft/2020-12/schema" ,
671+ "$id" : " https://example.com/draft2020-12/ref-and-id3/base.json" ,
672+ "$ref" : " nested/foo.json" ,
673+ "$defs" : {
674+ "foo" : {
675+ "$comment" : " canonical uri: https://example.com/draft2020-12/ref-and-id3/nested/foo.json" ,
676+ "$id" : " nested/foo.json" ,
677+ "$ref" : " ./bar.json"
678+ },
679+ "bar" : {
680+ "$comment" : " canonical uri: https://example.com/draft2020-12/ref-and-id3/nested/bar.json" ,
681+ "$id" : " nested/bar.json" ,
682+ "type" : " number"
683+ }
684+ }
685+ },
686+ "tests" : [
687+ {
688+ "description" : " data is valid against nested sibling" ,
689+ "data" : 5 ,
690+ "valid" : true
691+ },
692+ {
693+ "description" : " data is invalid against nested sibling" ,
694+ "data" : " a" ,
695+ "valid" : false
696+ }
697+ ]
698+ },
666699 {
667700 "description" : " simple URN base URI with $ref via the URN" ,
668701 "schema" : {
Original file line number Diff line number Diff line change 663663 }
664664 ]
665665 },
666+ {
667+ "description" : " order of evaluation: $id and $ref on nested schema" ,
668+ "schema" : {
669+ "$comment" : " $id must be evaluated before $ref to get the proper $ref destination" ,
670+ "$schema" : " https://json-schema.org/v1" ,
671+ "$id" : " https://example.com/v1/ref-and-id3/base.json" ,
672+ "$ref" : " nested/foo.json" ,
673+ "$defs" : {
674+ "foo" : {
675+ "$comment" : " canonical uri: https://example.com/v1/ref-and-id3/nested/foo.json" ,
676+ "$id" : " nested/foo.json" ,
677+ "$ref" : " ./bar.json"
678+ },
679+ "bar" : {
680+ "$comment" : " canonical uri: https://example.com/v1/ref-and-id3/nested/bar.json" ,
681+ "$id" : " nested/bar.json" ,
682+ "type" : " number"
683+ }
684+ }
685+ },
686+ "tests" : [
687+ {
688+ "description" : " data is valid against nested sibling" ,
689+ "data" : 5 ,
690+ "valid" : true
691+ },
692+ {
693+ "description" : " data is invalid against nested sibling" ,
694+ "data" : " a" ,
695+ "valid" : false
696+ }
697+ ]
698+ },
666699 {
667700 "description" : " simple URN base URI with $ref via the URN" ,
668701 "schema" : {
You can’t perform that action at this time.
0 commit comments