| 1 |
[ |
| 2 |
{ |
| 3 |
"description": "validation of relative-json-pointer strings", |
| 4 |
"schema": {"format": "relative-json-pointer"}, |
| 5 |
"comment": "see https://json-schema.org/draft/2019-09/relative-json-pointer.html#rfc.section.3", |
| 6 |
"tests": [ |
| 7 |
{ |
| 8 |
"description": "non-negative-integer with empty json-pointer", |
| 9 |
"data": "0", |
| 10 |
"valid": true |
| 11 |
}, |
| 12 |
{ |
| 13 |
"description": "non-negative-integer with one-char json-pointer", |
| 14 |
"data": "0/", |
| 15 |
"valid": true |
| 16 |
}, |
| 17 |
{ |
| 18 |
"description": "non-negative-integer with longer json-pointer", |
| 19 |
"data": "0/a", |
| 20 |
"valid": true |
| 21 |
}, |
| 22 |
{ |
| 23 |
"description": "non-negative-integer #", |
| 24 |
"data": "0#", |
| 25 |
"valid": true |
| 26 |
}, |
| 27 |
{ |
| 28 |
"description": "## is not a valid json-pointer", |
| 29 |
"data": "0##", |
| 30 |
"valid": false |
| 31 |
}, |
| 32 |
{ |
| 33 |
"description": "zero cannot be followed by other digits, plus json-pointer", |
| 34 |
"data": "01/a", |
| 35 |
"valid": false |
| 36 |
}, |
| 37 |
{ |
| 38 |
"description": "zero cannot be followed by other digits, plus octothorpe", |
| 39 |
"data": "01#", |
| 40 |
"valid": false |
| 41 |
} |
| 42 |
] |
| 43 |
} |
| 44 |
] |