File tree 9 files changed +238
-0
lines changed
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 830
830
"valid" : false
831
831
}
832
832
]
833
+ },
834
+ {
835
+ "description" : " URN ref with nested pointer ref" ,
836
+ "schema" : {
837
+ "$ref" : " urn:uuid:deadbeef-4321-ffff-ffff-1234feebdaed" ,
838
+ "$defs" : {
839
+ "foo" : {
840
+ "$id" : " urn:uuid:deadbeef-4321-ffff-ffff-1234feebdaed" ,
841
+ "$defs" : {"bar" : {"type" : " string" }},
842
+ "$ref" : " #/$defs/bar"
843
+ }
844
+ }
845
+ },
846
+ "tests" : [
847
+ {
848
+ "description" : " a string is valid" ,
849
+ "data" : " bar" ,
850
+ "valid" : true
851
+ },
852
+ {
853
+ "description" : " a non-string is invalid" ,
854
+ "data" : 12 ,
855
+ "valid" : false
856
+ }
857
+ ]
833
858
}
834
859
]
Original file line number Diff line number Diff line change 229
229
"valid" : true
230
230
}
231
231
]
232
+ },
233
+ {
234
+ "description" : " remote HTTP ref with different $id" ,
235
+ "schema" : {"$ref" : " http://localhost:1234/different-id-ref-string.json" },
236
+ "tests" : [
237
+ {
238
+ "description" : " number is invalid" ,
239
+ "data" : 1 ,
240
+ "valid" : false
241
+ },
242
+ {
243
+ "description" : " string is valid" ,
244
+ "data" : " foo" ,
245
+ "valid" : true
246
+ }
247
+ ]
248
+ },
249
+ {
250
+ "description" : " remote HTTP ref with different URN $id" ,
251
+ "schema" : {"$ref" : " http://localhost:1234/urn-ref-string.json" },
252
+ "tests" : [
253
+ {
254
+ "description" : " number is invalid" ,
255
+ "data" : 1 ,
256
+ "valid" : false
257
+ },
258
+ {
259
+ "description" : " string is valid" ,
260
+ "data" : " foo" ,
261
+ "valid" : true
262
+ }
263
+ ]
264
+ },
265
+ {
266
+ "description" : " remote HTTP ref with nested absolute ref" ,
267
+ "schema" : {"$ref" : " http://localhost:1234/nested-absolute-ref-to-string.json" },
268
+ "tests" : [
269
+ {
270
+ "description" : " number is invalid" ,
271
+ "data" : 1 ,
272
+ "valid" : false
273
+ },
274
+ {
275
+ "description" : " string is valid" ,
276
+ "data" : " foo" ,
277
+ "valid" : true
278
+ }
279
+ ]
232
280
}
233
281
]
Original file line number Diff line number Diff line change 830
830
"valid" : false
831
831
}
832
832
]
833
+ },
834
+ {
835
+ "description" : " URN ref with nested pointer ref" ,
836
+ "schema" : {
837
+ "$ref" : " urn:uuid:deadbeef-4321-ffff-ffff-1234feebdaed" ,
838
+ "$defs" : {
839
+ "foo" : {
840
+ "$id" : " urn:uuid:deadbeef-4321-ffff-ffff-1234feebdaed" ,
841
+ "$defs" : {"bar" : {"type" : " string" }},
842
+ "$ref" : " #/$defs/bar"
843
+ }
844
+ }
845
+ },
846
+ "tests" : [
847
+ {
848
+ "description" : " a string is valid" ,
849
+ "data" : " bar" ,
850
+ "valid" : true
851
+ },
852
+ {
853
+ "description" : " a non-string is invalid" ,
854
+ "data" : 12 ,
855
+ "valid" : false
856
+ }
857
+ ]
833
858
}
834
859
]
Original file line number Diff line number Diff line change 229
229
"valid" : true
230
230
}
231
231
]
232
+ },
233
+ {
234
+ "description" : " remote HTTP ref with different $id" ,
235
+ "schema" : {"$ref" : " http://localhost:1234/different-id-ref-string.json" },
236
+ "tests" : [
237
+ {
238
+ "description" : " number is invalid" ,
239
+ "data" : 1 ,
240
+ "valid" : false
241
+ },
242
+ {
243
+ "description" : " string is valid" ,
244
+ "data" : " foo" ,
245
+ "valid" : true
246
+ }
247
+ ]
248
+ },
249
+ {
250
+ "description" : " remote HTTP ref with different URN $id" ,
251
+ "schema" : {"$ref" : " http://localhost:1234/urn-ref-string.json" },
252
+ "tests" : [
253
+ {
254
+ "description" : " number is invalid" ,
255
+ "data" : 1 ,
256
+ "valid" : false
257
+ },
258
+ {
259
+ "description" : " string is valid" ,
260
+ "data" : " foo" ,
261
+ "valid" : true
262
+ }
263
+ ]
264
+ },
265
+ {
266
+ "description" : " remote HTTP ref with nested absolute ref" ,
267
+ "schema" : {"$ref" : " http://localhost:1234/nested-absolute-ref-to-string.json" },
268
+ "tests" : [
269
+ {
270
+ "description" : " number is invalid" ,
271
+ "data" : 1 ,
272
+ "valid" : false
273
+ },
274
+ {
275
+ "description" : " string is valid" ,
276
+ "data" : " foo" ,
277
+ "valid" : true
278
+ }
279
+ ]
232
280
}
233
281
]
Original file line number Diff line number Diff line change 830
830
"valid" : false
831
831
}
832
832
]
833
+ },
834
+ {
835
+ "description" : " URN ref with nested pointer ref" ,
836
+ "schema" : {
837
+ "$ref" : " urn:uuid:deadbeef-4321-ffff-ffff-1234feebdaed" ,
838
+ "$defs" : {
839
+ "foo" : {
840
+ "$id" : " urn:uuid:deadbeef-4321-ffff-ffff-1234feebdaed" ,
841
+ "$defs" : {"bar" : {"type" : " string" }},
842
+ "$ref" : " #/$defs/bar"
843
+ }
844
+ }
845
+ },
846
+ "tests" : [
847
+ {
848
+ "description" : " a string is valid" ,
849
+ "data" : " bar" ,
850
+ "valid" : true
851
+ },
852
+ {
853
+ "description" : " a non-string is invalid" ,
854
+ "data" : 12 ,
855
+ "valid" : false
856
+ }
857
+ ]
833
858
}
834
859
]
Original file line number Diff line number Diff line change 229
229
"valid" : true
230
230
}
231
231
]
232
+ },
233
+ {
234
+ "description" : " remote HTTP ref with different $id" ,
235
+ "schema" : {"$ref" : " http://localhost:1234/different-id-ref-string.json" },
236
+ "tests" : [
237
+ {
238
+ "description" : " number is invalid" ,
239
+ "data" : 1 ,
240
+ "valid" : false
241
+ },
242
+ {
243
+ "description" : " string is valid" ,
244
+ "data" : " foo" ,
245
+ "valid" : true
246
+ }
247
+ ]
248
+ },
249
+ {
250
+ "description" : " remote HTTP ref with different URN $id" ,
251
+ "schema" : {"$ref" : " http://localhost:1234/urn-ref-string.json" },
252
+ "tests" : [
253
+ {
254
+ "description" : " number is invalid" ,
255
+ "data" : 1 ,
256
+ "valid" : false
257
+ },
258
+ {
259
+ "description" : " string is valid" ,
260
+ "data" : " foo" ,
261
+ "valid" : true
262
+ }
263
+ ]
264
+ },
265
+ {
266
+ "description" : " remote HTTP ref with nested absolute ref" ,
267
+ "schema" : {"$ref" : " http://localhost:1234/nested-absolute-ref-to-string.json" },
268
+ "tests" : [
269
+ {
270
+ "description" : " number is invalid" ,
271
+ "data" : 1 ,
272
+ "valid" : false
273
+ },
274
+ {
275
+ "description" : " string is valid" ,
276
+ "data" : " foo" ,
277
+ "valid" : true
278
+ }
279
+ ]
232
280
}
233
281
]
You can’t perform that action at this time.
0 commit comments