Debian Codegraph @

t/additional-tests-draft2020-12/formats.json

raw
1 [
2 {
3 "description": "format validation after a $ref",
4 "schema": {
5 "$defs": {
6 "my_format": {
7 "type": "string",
8 "format": "duration"
9 }
10 },
11 "$ref": "#/$defs/my_format"
12 },
13 "tests": [
14 {
15 "description": "invalid duration",
16 "data": "PT1D",
17 "valid": false
18 },
19 {
20 "description": "valid duration",
21 "data": "P4Y",
22 "valid": true
23 }
24 ]
25 },
26 {
27 "description": "format validation after an $id",
28 "schema": {
29 "type": "array",
30 "items": {
31 "$id": "bloop",
32 "allOf": [
33 {
34 "type": "string",
35 "format": "duration"
36 }
37 ]
38 }
39 },
40 "tests": [
41 {
42 "description": "invalid duration",
43 "data": [ "PT1D" ],
44 "valid": false
45 },
46 {
47 "description": "valid duration",
48 "data": [ "P4Y" ],
49 "valid": true
50 }
51 ]
52 }
53 ]