|
291 | 291 | },
|
292 | 292 | "tests": [
|
293 | 293 | {
|
294 |
| - "description": "leaf node does not match; no recursion", |
| 294 | + "description": "leaf node does not match; no recursion", |
295 | 295 | "data": { "foo": true },
|
296 | 296 | "valid": false
|
297 | 297 | },
|
|
306 | 306 | "valid": false
|
307 | 307 | }
|
308 | 308 | ]
|
| 309 | + }, |
| 310 | + { |
| 311 | + "description": "multiple dynamic paths to the $recursiveRef keyword", |
| 312 | + "schema": { |
| 313 | + "$id": "recursiveRef8_main.json", |
| 314 | + "$defs": { |
| 315 | + "inner": { |
| 316 | + "$id": "recursiveRef8_inner.json", |
| 317 | + "$recursiveAnchor": true, |
| 318 | + "title": "inner", |
| 319 | + "additionalProperties": { |
| 320 | + "$recursiveRef": "#" |
| 321 | + } |
| 322 | + } |
| 323 | + }, |
| 324 | + "if": { |
| 325 | + "propertyNames": { |
| 326 | + "pattern": "^[a-m]" |
| 327 | + } |
| 328 | + }, |
| 329 | + "then": { |
| 330 | + "title": "any type of node", |
| 331 | + "$id": "recursiveRef8_anyLeafNode.json", |
| 332 | + "$recursiveAnchor": true, |
| 333 | + "$ref": "recursiveRef8_main.json#/$defs/inner" |
| 334 | + }, |
| 335 | + "else": { |
| 336 | + "title": "integer node", |
| 337 | + "$id": "recursiveRef8_integerNode.json", |
| 338 | + "$recursiveAnchor": true, |
| 339 | + "type": [ "object", "integer" ], |
| 340 | + "$ref": "recursiveRef8_main.json#/$defs/inner" |
| 341 | + } |
| 342 | + }, |
| 343 | + "tests": [ |
| 344 | + { |
| 345 | + "description": "recurse to anyLeafNode - floats are allowed", |
| 346 | + "data": { "alpha": 1.1 }, |
| 347 | + "valid": true |
| 348 | + }, |
| 349 | + { |
| 350 | + "description": "recurse to integerNode - floats are not allowed", |
| 351 | + "data": { "november": 1.1 }, |
| 352 | + "valid": false |
| 353 | + } |
| 354 | + ] |
309 | 355 | }
|
310 | 356 | ]
|
0 commit comments