summaryrefslogtreecommitdiff
path: root/tests/draft7/additionalItems.json
diff options
context:
space:
mode:
Diffstat (limited to 'tests/draft7/additionalItems.json')
-rw-r--r--tests/draft7/additionalItems.json23
1 files changed, 21 insertions, 2 deletions
diff --git a/tests/draft7/additionalItems.json b/tests/draft7/additionalItems.json
index ee46b61..784bc84 100644
--- a/tests/draft7/additionalItems.json
+++ b/tests/draft7/additionalItems.json
@@ -19,7 +19,7 @@
]
},
{
- "description": "items is schema, no additionalItems",
+ "description": "when items is schema, additionalItems does nothing",
"schema": {
"items": {},
"additionalItems": false
@@ -33,7 +33,7 @@
]
},
{
- "description": "array of items with no additionalItems",
+ "description": "array of items with no additionalItems permitted",
"schema": {
"items": [{}, {}, {}],
"additionalItems": false
@@ -126,5 +126,24 @@
"valid": false
}
]
+ },
+ {
+ "description": "items validation adjusts the starting index for additionalItems",
+ "schema": {
+ "items": [ { "type": "string" } ],
+ "additionalItems": { "type": "integer" }
+ },
+ "tests": [
+ {
+ "description": "valid items",
+ "data": [ "x", 2, 3 ],
+ "valid": true
+ },
+ {
+ "description": "wrong type of second item",
+ "data": [ "x", "y" ],
+ "valid": false
+ }
+ ]
}
]