File tree Expand file tree Collapse file tree 9 files changed +238
-0
lines changed Expand file tree Collapse file tree 9 files changed +238
-0
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "$id" : " http://localhost:1234/real-id-ref-string.json" ,
3
+ "$defs" : {"bar" : {"type" : " string" }},
4
+ "$ref" : " #/$defs/bar"
5
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "$defs" : {
3
+ "bar" : {
4
+ "$id" : " http://localhost:1234/the-nested-id.json" ,
5
+ "type" : " string"
6
+ }
7
+ },
8
+ "$ref" : " http://localhost:1234/the-nested-id.json"
9
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "$id" : " urn:uuid:feebdaed-ffff-0000-ffff-0000deadbeef" ,
3
+ "$defs" : {"bar" : {"type" : " string" }},
4
+ "$ref" : " #/$defs/bar"
5
+ }
Original file line number Diff line number Diff line change 858
858
"valid" : false
859
859
}
860
860
]
861
+ },
862
+ {
863
+ "description" : " URN ref with nested pointer ref" ,
864
+ "schema" : {
865
+ "$ref" : " urn:uuid:deadbeef-4321-ffff-ffff-1234feebdaed" ,
866
+ "$defs" : {
867
+ "foo" : {
868
+ "$id" : " urn:uuid:deadbeef-4321-ffff-ffff-1234feebdaed" ,
869
+ "$defs" : {"bar" : {"type" : " string" }},
870
+ "$ref" : " #/$defs/bar"
871
+ }
872
+ }
873
+ },
874
+ "tests" : [
875
+ {
876
+ "description" : " a string is valid" ,
877
+ "data" : " bar" ,
878
+ "valid" : true
879
+ },
880
+ {
881
+ "description" : " a non-string is invalid" ,
882
+ "data" : 12 ,
883
+ "valid" : false
884
+ }
885
+ ]
861
886
}
862
887
]
Original file line number Diff line number Diff line change 243
243
"valid" : true
244
244
}
245
245
]
246
+ },
247
+ {
248
+ "description" : " remote HTTP ref with different $id" ,
249
+ "schema" : {"$ref" : " http://localhost:1234/different-id-ref-string.json" },
250
+ "tests" : [
251
+ {
252
+ "description" : " number is invalid" ,
253
+ "data" : 1 ,
254
+ "valid" : false
255
+ },
256
+ {
257
+ "description" : " string is valid" ,
258
+ "data" : " foo" ,
259
+ "valid" : true
260
+ }
261
+ ]
262
+ },
263
+ {
264
+ "description" : " remote HTTP ref with different URN $id" ,
265
+ "schema" : {"$ref" : " http://localhost:1234/urn-ref-string.json" },
266
+ "tests" : [
267
+ {
268
+ "description" : " number is invalid" ,
269
+ "data" : 1 ,
270
+ "valid" : false
271
+ },
272
+ {
273
+ "description" : " string is valid" ,
274
+ "data" : " foo" ,
275
+ "valid" : true
276
+ }
277
+ ]
278
+ },
279
+ {
280
+ "description" : " remote HTTP ref with nested absolute ref" ,
281
+ "schema" : {"$ref" : " http://localhost:1234/nested-absolute-ref-to-string.json" },
282
+ "tests" : [
283
+ {
284
+ "description" : " number is invalid" ,
285
+ "data" : 1 ,
286
+ "valid" : false
287
+ },
288
+ {
289
+ "description" : " string is valid" ,
290
+ "data" : " foo" ,
291
+ "valid" : true
292
+ }
293
+ ]
246
294
}
247
295
]
Original file line number Diff line number Diff line change 858
858
"valid" : false
859
859
}
860
860
]
861
+ },
862
+ {
863
+ "description" : " URN ref with nested pointer ref" ,
864
+ "schema" : {
865
+ "$ref" : " urn:uuid:deadbeef-4321-ffff-ffff-1234feebdaed" ,
866
+ "$defs" : {
867
+ "foo" : {
868
+ "$id" : " urn:uuid:deadbeef-4321-ffff-ffff-1234feebdaed" ,
869
+ "$defs" : {"bar" : {"type" : " string" }},
870
+ "$ref" : " #/$defs/bar"
871
+ }
872
+ }
873
+ },
874
+ "tests" : [
875
+ {
876
+ "description" : " a string is valid" ,
877
+ "data" : " bar" ,
878
+ "valid" : true
879
+ },
880
+ {
881
+ "description" : " a non-string is invalid" ,
882
+ "data" : 12 ,
883
+ "valid" : false
884
+ }
885
+ ]
861
886
}
862
887
]
Original file line number Diff line number Diff line change 243
243
"valid" : true
244
244
}
245
245
]
246
+ },
247
+ {
248
+ "description" : " remote HTTP ref with different $id" ,
249
+ "schema" : {"$ref" : " http://localhost:1234/different-id-ref-string.json" },
250
+ "tests" : [
251
+ {
252
+ "description" : " number is invalid" ,
253
+ "data" : 1 ,
254
+ "valid" : false
255
+ },
256
+ {
257
+ "description" : " string is valid" ,
258
+ "data" : " foo" ,
259
+ "valid" : true
260
+ }
261
+ ]
262
+ },
263
+ {
264
+ "description" : " remote HTTP ref with different URN $id" ,
265
+ "schema" : {"$ref" : " http://localhost:1234/urn-ref-string.json" },
266
+ "tests" : [
267
+ {
268
+ "description" : " number is invalid" ,
269
+ "data" : 1 ,
270
+ "valid" : false
271
+ },
272
+ {
273
+ "description" : " string is valid" ,
274
+ "data" : " foo" ,
275
+ "valid" : true
276
+ }
277
+ ]
278
+ },
279
+ {
280
+ "description" : " remote HTTP ref with nested absolute ref" ,
281
+ "schema" : {"$ref" : " http://localhost:1234/nested-absolute-ref-to-string.json" },
282
+ "tests" : [
283
+ {
284
+ "description" : " number is invalid" ,
285
+ "data" : 1 ,
286
+ "valid" : false
287
+ },
288
+ {
289
+ "description" : " string is valid" ,
290
+ "data" : " foo" ,
291
+ "valid" : true
292
+ }
293
+ ]
246
294
}
247
295
]
Original file line number Diff line number Diff line change 858
858
"valid" : false
859
859
}
860
860
]
861
+ },
862
+ {
863
+ "description" : " URN ref with nested pointer ref" ,
864
+ "schema" : {
865
+ "$ref" : " urn:uuid:deadbeef-4321-ffff-ffff-1234feebdaed" ,
866
+ "$defs" : {
867
+ "foo" : {
868
+ "$id" : " urn:uuid:deadbeef-4321-ffff-ffff-1234feebdaed" ,
869
+ "$defs" : {"bar" : {"type" : " string" }},
870
+ "$ref" : " #/$defs/bar"
871
+ }
872
+ }
873
+ },
874
+ "tests" : [
875
+ {
876
+ "description" : " a string is valid" ,
877
+ "data" : " bar" ,
878
+ "valid" : true
879
+ },
880
+ {
881
+ "description" : " a non-string is invalid" ,
882
+ "data" : 12 ,
883
+ "valid" : false
884
+ }
885
+ ]
861
886
}
862
887
]
Original file line number Diff line number Diff line change 243
243
"valid" : true
244
244
}
245
245
]
246
+ },
247
+ {
248
+ "description" : " remote HTTP ref with different $id" ,
249
+ "schema" : {"$ref" : " http://localhost:1234/different-id-ref-string.json" },
250
+ "tests" : [
251
+ {
252
+ "description" : " number is invalid" ,
253
+ "data" : 1 ,
254
+ "valid" : false
255
+ },
256
+ {
257
+ "description" : " string is valid" ,
258
+ "data" : " foo" ,
259
+ "valid" : true
260
+ }
261
+ ]
262
+ },
263
+ {
264
+ "description" : " remote HTTP ref with different URN $id" ,
265
+ "schema" : {"$ref" : " http://localhost:1234/urn-ref-string.json" },
266
+ "tests" : [
267
+ {
268
+ "description" : " number is invalid" ,
269
+ "data" : 1 ,
270
+ "valid" : false
271
+ },
272
+ {
273
+ "description" : " string is valid" ,
274
+ "data" : " foo" ,
275
+ "valid" : true
276
+ }
277
+ ]
278
+ },
279
+ {
280
+ "description" : " remote HTTP ref with nested absolute ref" ,
281
+ "schema" : {"$ref" : " http://localhost:1234/nested-absolute-ref-to-string.json" },
282
+ "tests" : [
283
+ {
284
+ "description" : " number is invalid" ,
285
+ "data" : 1 ,
286
+ "valid" : false
287
+ },
288
+ {
289
+ "description" : " string is valid" ,
290
+ "data" : " foo" ,
291
+ "valid" : true
292
+ }
293
+ ]
246
294
}
247
295
]
You can’t perform that action at this time.
0 commit comments