-
-
Notifications
You must be signed in to change notification settings - Fork 227
Open
Description
Test:
JSON-Schema-Test-Suite/tests/draft7/additionalItems.json
Lines 120 to 135 in 83e866b
| { | |
| "description": "additionalItems does not look in applicators, valid case", | |
| "schema": { | |
| "allOf": [ | |
| { "items": [ { "type": "integer" } ] } | |
| ], | |
| "additionalItems": { "type": "boolean" } | |
| }, | |
| "tests": [ | |
| { | |
| "description": "items defined in allOf are not examined", | |
| "data": [ 1, null ], | |
| "valid": true | |
| } | |
| ] | |
| }, |
While it's true that additionalItems can't see into applicators, the reason this passes validation is actually because the default value for items is an empty schema, which evaluates all items, leaving none for additionalItems to operate on.
We already have a test for default items, though, which kind of makes this one redundant.
We also have an invalid test immediately below the test in question that could easily have a valid test data case added to it. This test properly verifies that the additionalItems is failing on the second element.
Metadata
Metadata
Assignees
Labels
No labels