File tree Expand file tree Collapse file tree 10 files changed +155
-0
lines changed Expand file tree Collapse file tree 10 files changed +155
-0
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "$id" : " http://localhost:1234/draft2019-09/detached-ref" ,
3
+ "$schema" : " https://json-schema.org/draft/2019-09/schema" ,
4
+ "$defs" : {
5
+ "foo" : {
6
+ "$ref" : " #detached"
7
+ },
8
+ "detached" : {
9
+ "$anchor" : " detached" ,
10
+ "type" : " integer"
11
+ }
12
+ }
13
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "$id" : " http://localhost:1234/draft2020-12/detached-dynamicref" ,
3
+ "$schema" : " https://json-schema.org/draft/2020-12/schema" ,
4
+ "$defs" : {
5
+ "foo" : {
6
+ "$dynamicRef" : " #detached"
7
+ },
8
+ "detached" : {
9
+ "$dynamicAnchor" : " detached" ,
10
+ "type" : " integer"
11
+ }
12
+ }
13
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "$id" : " http://localhost:1234/draft2020-12/detached-ref" ,
3
+ "$schema" : " https://json-schema.org/draft/2020-12/schema" ,
4
+ "$defs" : {
5
+ "foo" : {
6
+ "$ref" : " #detached"
7
+ },
8
+ "detached" : {
9
+ "$anchor" : " detached" ,
10
+ "type" : " integer"
11
+ }
12
+ }
13
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "$id" : " http://localhost:1234/draft6/detached-ref" ,
3
+ "$schema" : " http://json-schema.org/draft-06/schema#" ,
4
+ "definitions" : {
5
+ "foo" : {
6
+ "$ref" : " #detached"
7
+ },
8
+ "detached" : {
9
+ "$id" : " #detached" ,
10
+ "type" : " integer"
11
+ }
12
+ }
13
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "$id" : " http://localhost:1234/draft7/detached-ref" ,
3
+ "$schema" : " http://json-schema.org/draft-07/schema#" ,
4
+ "definitions" : {
5
+ "foo" : {
6
+ "$ref" : " #detached"
7
+ },
8
+ "detached" : {
9
+ "$id" : " #detached" ,
10
+ "type" : " integer"
11
+ }
12
+ }
13
+ }
Original file line number Diff line number Diff line change 1055
1055
"valid" : false
1056
1056
}
1057
1057
]
1058
+ },
1059
+ {
1060
+ "description" : " $ref to $ref finds detached $anchor" ,
1061
+ "schema" : {
1062
+ "$ref" : " http://localhost:1234/draft2019-09/detached-ref#/$defs/foo"
1063
+ },
1064
+ "tests" : [
1065
+ {
1066
+ "description" : " number is valid" ,
1067
+ "data" : 1 ,
1068
+ "valid" : true
1069
+ },
1070
+ {
1071
+ "description" : " non-number is invalid" ,
1072
+ "data" : " a" ,
1073
+ "valid" : false
1074
+ }
1075
+ ]
1058
1076
}
1059
1077
]
Original file line number Diff line number Diff line change 708
708
"valid" : true
709
709
}
710
710
]
711
+ },
712
+ {
713
+ "description" : " $ref to $dynamicRef finds detached $dynamicAnchor" ,
714
+ "schema" : {
715
+ "$ref" : " http://localhost:1234/draft2020-12/detached-dynamicref#/$defs/foo"
716
+ },
717
+ "tests" : [
718
+ {
719
+ "description" : " number is valid" ,
720
+ "data" : 1 ,
721
+ "valid" : true
722
+ },
723
+ {
724
+ "description" : " non-number is invalid" ,
725
+ "data" : " a" ,
726
+ "valid" : false
727
+ }
728
+ ]
711
729
}
712
730
]
Original file line number Diff line number Diff line change 1055
1055
"valid" : false
1056
1056
}
1057
1057
]
1058
+ },
1059
+ {
1060
+ "description" : " $ref to $ref finds detached $anchor" ,
1061
+ "schema" : {
1062
+ "$ref" : " http://localhost:1234/draft2020-12/detached-ref#/$defs/foo"
1063
+ },
1064
+ "tests" : [
1065
+ {
1066
+ "description" : " number is valid" ,
1067
+ "data" : 1 ,
1068
+ "valid" : true
1069
+ },
1070
+ {
1071
+ "description" : " non-number is invalid" ,
1072
+ "data" : " a" ,
1073
+ "valid" : false
1074
+ }
1075
+ ]
1058
1076
}
1059
1077
]
Original file line number Diff line number Diff line change 925
925
"valid" : false
926
926
}
927
927
]
928
+ },
929
+ {
930
+ "description" : " $ref to $ref finds location-independent $id" ,
931
+ "schema" : {
932
+ "$ref" : " http://localhost:1234/draft6/detached-ref#/definitions/foo"
933
+ },
934
+ "tests" : [
935
+ {
936
+ "description" : " number is valid" ,
937
+ "data" : 1 ,
938
+ "valid" : true
939
+ },
940
+ {
941
+ "description" : " non-number is invalid" ,
942
+ "data" : " a" ,
943
+ "valid" : false
944
+ }
945
+ ]
928
946
}
929
947
]
Original file line number Diff line number Diff line change 1039
1039
"valid" : false
1040
1040
}
1041
1041
]
1042
+ },
1043
+ {
1044
+ "description" : " $ref to $ref finds location-independent $id" ,
1045
+ "schema" : {
1046
+ "$ref" : " http://localhost:1234/draft7/detached-ref#/definitions/foo"
1047
+ },
1048
+ "tests" : [
1049
+ {
1050
+ "description" : " number is valid" ,
1051
+ "data" : 1 ,
1052
+ "valid" : true
1053
+ },
1054
+ {
1055
+ "description" : " non-number is invalid" ,
1056
+ "data" : " a" ,
1057
+ "valid" : false
1058
+ }
1059
+ ]
1042
1060
}
1043
1061
]
You can’t perform that action at this time.
0 commit comments