summaryrefslogtreecommitdiff
path: root/tests/draft2020-12/items.json
diff options
context:
space:
mode:
Diffstat (limited to 'tests/draft2020-12/items.json')
-rw-r--r--tests/draft2020-12/items.json19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/draft2020-12/items.json b/tests/draft2020-12/items.json
index 08a49ee..b918194 100644
--- a/tests/draft2020-12/items.json
+++ b/tests/draft2020-12/items.json
@@ -233,5 +233,24 @@
"valid": true
}
]
+ },
+ {
+ "description": "prefixItems validation adjusts the starting index for items",
+ "schema": {
+ "prefixItems": [ { "type": "string" } ],
+ "items": { "type": "integer" }
+ },
+ "tests": [
+ {
+ "description": "valid items",
+ "data": [ "x", 2, 3 ],
+ "valid": true
+ },
+ {
+ "description": "wrong type of second item",
+ "data": [ "x", "y" ],
+ "valid": false
+ }
+ ]
}
]