| 1 |
[ |
| 2 |
{ |
| 3 |
"description": "$id must be evaluated before $ref to get the proper $ref destination", |
| 4 |
"schema": { |
| 5 |
"$id": "/ref-and-id2/base.json", |
| 6 |
"allOf": [ { "$ref": "int.json" } ], |
| 7 |
"definitions": { |
| 8 |
"bigint": { |
| 9 |
"$comment": "canonical uri: /ref-and-id2/int.json", |
| 10 |
"$id": "int.json", |
| 11 |
"maximum": 10 |
| 12 |
}, |
| 13 |
"smallint": { |
| 14 |
"$comment": "canonical uri: /ref-and-id2-int.json", |
| 15 |
"$id": "/ref-and-id2-int.json", |
| 16 |
"maximum": 2 |
| 17 |
} |
| 18 |
} |
| 19 |
}, |
| 20 |
"tests": [ |
| 21 |
{ |
| 22 |
"description": "data is valid against first definition", |
| 23 |
"data": 5, |
| 24 |
"valid": true |
| 25 |
}, |
| 26 |
{ |
| 27 |
"description": "data is invalid against first definition", |
| 28 |
"data": 50, |
| 29 |
"valid": false |
| 30 |
} |
| 31 |
] |
| 32 |
} |
| 33 |
] |