diff options
Diffstat (limited to 'json/tests/draft-next/maxItems.json')
-rw-r--r-- | json/tests/draft-next/maxItems.json | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/json/tests/draft-next/maxItems.json b/json/tests/draft-next/maxItems.json new file mode 100644 index 0000000..f0c36ab --- /dev/null +++ b/json/tests/draft-next/maxItems.json @@ -0,0 +1,44 @@ +[ + { + "description": "maxItems validation", + "schema": {"maxItems": 2}, + "tests": [ + { + "description": "shorter is valid", + "data": [1], + "valid": true + }, + { + "description": "exact length is valid", + "data": [1, 2], + "valid": true + }, + { + "description": "too long is invalid", + "data": [1, 2, 3], + "valid": false + }, + { + "description": "ignores non-arrays", + "data": "foobar", + "valid": true + } + ] + }, + { + "description": "maxItems validation with a decimal", + "schema": {"maxItems": 2.0}, + "tests": [ + { + "description": "shorter is valid", + "data": [1], + "valid": true + }, + { + "description": "too long is invalid", + "data": [1, 2, 3], + "valid": false + } + ] + } +] |