| 1 |
[ |
| 2 |
{ |
| 3 |
"description": "$dynamicRef skips over intermediate resources - pointer reference across resource boundary", |
| 4 |
"schema": { |
| 5 |
"$schema": "https://json-schema.org/v1", |
| 6 |
"$id": "https://test.json-schema.org/dynamic-ref-skips-intermediate-resource/optional/main", |
| 7 |
"type": "object", |
| 8 |
"properties": { |
| 9 |
"bar-item": { |
| 10 |
"$ref": "bar#/$defs/item" |
| 11 |
} |
| 12 |
}, |
| 13 |
"$defs": { |
| 14 |
"bar": { |
| 15 |
"$id": "bar", |
| 16 |
"type": "array", |
| 17 |
"items": { |
| 18 |
"$ref": "item" |
| 19 |
}, |
| 20 |
"$defs": { |
| 21 |
"item": { |
| 22 |
"$id": "item", |
| 23 |
"type": "object", |
| 24 |
"properties": { |
| 25 |
"content": { |
| 26 |
"$dynamicRef": "#content" |
| 27 |
} |
| 28 |
}, |
| 29 |
"$defs": { |
| 30 |
"defaultContent": { |
| 31 |
"$dynamicAnchor": "content", |
| 32 |
"type": "integer" |
| 33 |
} |
| 34 |
} |
| 35 |
}, |
| 36 |
"content": { |
| 37 |
"$dynamicAnchor": "content", |
| 38 |
"type": "string" |
| 39 |
} |
| 40 |
} |
| 41 |
} |
| 42 |
} |
| 43 |
}, |
| 44 |
"tests": [ |
| 45 |
{ |
| 46 |
"description": "integer property passes", |
| 47 |
"data": { "bar-item": { "content": 42 } }, |
| 48 |
"valid": true |
| 49 |
}, |
| 50 |
{ |
| 51 |
"description": "string property fails", |
| 52 |
"data": { "bar-item": { "content": "value" } }, |
| 53 |
"valid": false |
| 54 |
} |
| 55 |
] |
| 56 |
}] |