summaryrefslogtreecommitdiff
path: root/json/tests/draft7/additionalItems.json
diff options
context:
space:
mode:
Diffstat (limited to 'json/tests/draft7/additionalItems.json')
-rw-r--r--json/tests/draft7/additionalItems.json23
1 files changed, 23 insertions, 0 deletions
diff --git a/json/tests/draft7/additionalItems.json b/json/tests/draft7/additionalItems.json
index deb44fd..cae7236 100644
--- a/json/tests/draft7/additionalItems.json
+++ b/json/tests/draft7/additionalItems.json
@@ -21,6 +21,29 @@
{
"description": "when items is schema, additionalItems does nothing",
"schema": {
+ "items": {
+ "type": "integer"
+ },
+ "additionalItems": {
+ "type": "string"
+ }
+ },
+ "tests": [
+ {
+ "description": "valid with a array of type integers",
+ "data": [1,2,3],
+ "valid": true
+ },
+ {
+ "description": "invalid with a array of mixed types",
+ "data": [1,"2","3"],
+ "valid": false
+ }
+ ]
+ },
+ {
+ "description": "when items is schema, boolean additionalItems does nothing",
+ "schema": {
"items": {},
"additionalItems": false
},