File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change 352
352
"valid" : false
353
353
}
354
354
]
355
+ },
356
+ {
357
+ "comment" : " submit me as a PR!" ,
358
+ "description" : " dynamic $recursiveRef destination (not predictable at schema compile time)" ,
359
+ "schema" : {
360
+ "$id" : " main.json" ,
361
+ "$defs" : {
362
+ "inner" : {
363
+ "$id" : " inner.json" ,
364
+ "$recursiveAnchor" : true ,
365
+ "title" : " inner" ,
366
+ "additionalProperties" : {
367
+ "$recursiveRef" : " #"
368
+ }
369
+ }
370
+
371
+ },
372
+ "if" : { "propertyNames" : { "pattern" : " ^[a-m]" } },
373
+ "then" : {
374
+ "title" : " any type of node" ,
375
+ "$id" : " anyLeafNode.json" ,
376
+ "$recursiveAnchor" : true ,
377
+ "$ref" : " main.json#/$defs/inner"
378
+ },
379
+ "else" : {
380
+ "title" : " integer node" ,
381
+ "$id" : " integerNode.json" ,
382
+ "$recursiveAnchor" : true ,
383
+ "type" : [ " object" , " integer" ],
384
+ "$ref" : " main.json#/$defs/inner"
385
+ }
386
+ },
387
+ "tests" : [
388
+ {
389
+ "description" : " numeric node" ,
390
+ "data" : { "alpha" : 1.1 },
391
+ "valid" : true
392
+ },
393
+ {
394
+ "description" : " integer node" ,
395
+ "data" : { "november" : 1.1 },
396
+ "valid" : false
397
+ }
398
+ ]
355
399
}
356
400
]
You can’t perform that action at this time.
0 commit comments