diff options
author | Julian Berman <Julian@GrayVines.com> | 2021-04-12 21:09:52 -0400 |
---|---|---|
committer | Julian Berman <Julian@GrayVines.com> | 2021-04-12 21:09:52 -0400 |
commit | 2302e2ac453867abc00bbe599af84ce62e9838d2 (patch) | |
tree | b35a24b9327eeaacb4de6ead2b843b8038ba20d4 /json/tests/draft2020-12/default.json | |
parent | 833b6a9562487b4c46cd5640de5e2ae074c08796 (diff) | |
parent | 61d6022ad9cceb91eb634d01eecfc15358b1d8a1 (diff) | |
download | jsonschema-2302e2ac453867abc00bbe599af84ce62e9838d2.tar.gz |
Merge commit '61d6022ad9cceb91eb634d01eecfc15358b1d8a1'
* commit '61d6022ad9cceb91eb634d01eecfc15358b1d8a1':
Squashed 'json/' changes from 3627cc1..15ec577
Diffstat (limited to 'json/tests/draft2020-12/default.json')
-rw-r--r-- | json/tests/draft2020-12/default.json | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/json/tests/draft2020-12/default.json b/json/tests/draft2020-12/default.json new file mode 100644 index 0000000..1762977 --- /dev/null +++ b/json/tests/draft2020-12/default.json @@ -0,0 +1,49 @@ +[ + { + "description": "invalid type for default", + "schema": { + "properties": { + "foo": { + "type": "integer", + "default": [] + } + } + }, + "tests": [ + { + "description": "valid when property is specified", + "data": {"foo": 13}, + "valid": true + }, + { + "description": "still valid when the invalid default is used", + "data": {}, + "valid": true + } + ] + }, + { + "description": "invalid string value for default", + "schema": { + "properties": { + "bar": { + "type": "string", + "minLength": 4, + "default": "bad" + } + } + }, + "tests": [ + { + "description": "valid when property is specified", + "data": {"bar": "good"}, + "valid": true + }, + { + "description": "still valid when the invalid default is used", + "data": {}, + "valid": true + } + ] + } +] |