Skip to content

Commit ddef3b4

Browse files
committed
Squashed 'json/' changes from ba3a90534..329efe59c
329efe59c Update the language around coverage, draft2020-12 is just as usable :) 068131278 Ensure dependentSchemas also properly ignores non-object instances. git-subtree-dir: json git-subtree-split: 329efe59c65ea9f49af9c5c07dd6f5d22cb67ef4
1 parent 4ecbea5 commit ddef3b4

File tree

4 files changed

+52
-3
lines changed

4 files changed

+52
-3
lines changed

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,13 @@ directory. This is:
6060

6161
## Coverage
6262

63-
Drafts 07, 06, 04, and 03 should have full coverage, with tests for drafts 06,
64-
07, 2019-09 and 2020-12 being considered current and actively supported.
65-
Drafts 2019-09 and 2020-12 are almost fully covered.
63+
All JSON Schema specification releases should be well covered by this suite,
64+
including drafts 2020-12, 2019-09, 07, 06, 04 and 03. Additional coverage is
65+
always welcome, particularly for bugs encountered in real-world
66+
implementations.
67+
68+
Drafts 04 and 03 are considered "frozen" in that less effort is put in to
69+
backport new tests to these versions.
6670

6771
Contributions are very welcome, especially from implementers as they add support
6872
to their own implementations.

tests/draft-next/dependentSchemas.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,21 @@
3636
"description": "wrong type both",
3737
"data": {"foo": "quux", "bar": "quux"},
3838
"valid": false
39+
},
40+
{
41+
"description": "ignores arrays",
42+
"data": ["bar"],
43+
"valid": true
44+
},
45+
{
46+
"description": "ignores strings",
47+
"data": "foobar",
48+
"valid": true
49+
},
50+
{
51+
"description": "ignores other non-objects",
52+
"data": 12,
53+
"valid": true
3954
}
4055
]
4156
},

tests/draft2019-09/dependentSchemas.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,21 @@
3636
"description": "wrong type both",
3737
"data": {"foo": "quux", "bar": "quux"},
3838
"valid": false
39+
},
40+
{
41+
"description": "ignores arrays",
42+
"data": ["bar"],
43+
"valid": true
44+
},
45+
{
46+
"description": "ignores strings",
47+
"data": "foobar",
48+
"valid": true
49+
},
50+
{
51+
"description": "ignores other non-objects",
52+
"data": 12,
53+
"valid": true
3954
}
4055
]
4156
},

tests/draft2020-12/dependentSchemas.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,21 @@
3636
"description": "wrong type both",
3737
"data": {"foo": "quux", "bar": "quux"},
3838
"valid": false
39+
},
40+
{
41+
"description": "ignores arrays",
42+
"data": ["bar"],
43+
"valid": true
44+
},
45+
{
46+
"description": "ignores strings",
47+
"data": "foobar",
48+
"valid": true
49+
},
50+
{
51+
"description": "ignores other non-objects",
52+
"data": 12,
53+
"valid": true
3954
}
4055
]
4156
},

0 commit comments

Comments
 (0)