diff options
Diffstat (limited to 'tests/draft-next/optional/format/uri-template.json')
-rw-r--r-- | tests/draft-next/optional/format/uri-template.json | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/tests/draft-next/optional/format/uri-template.json b/tests/draft-next/optional/format/uri-template.json new file mode 100644 index 0000000..f57d62d --- /dev/null +++ b/tests/draft-next/optional/format/uri-template.json @@ -0,0 +1,61 @@ +[ + { + "description": "format: uri-template", + "schema": { + "$schema": "https://json-schema.org/draft/next/schema", + "format": "uri-template" + }, + "tests": [ + { + "description": "all string formats ignore integers", + "data": 12, + "valid": true + }, + { + "description": "all string formats ignore floats", + "data": 13.7, + "valid": true + }, + { + "description": "all string formats ignore objects", + "data": {}, + "valid": true + }, + { + "description": "all string formats ignore arrays", + "data": [], + "valid": true + }, + { + "description": "all string formats ignore booleans", + "data": false, + "valid": true + }, + { + "description": "all string formats ignore nulls", + "data": null, + "valid": true + }, + { + "description": "a valid uri-template", + "data": "http://example.com/dictionary/{term:1}/{term}", + "valid": true + }, + { + "description": "an invalid uri-template", + "data": "http://example.com/dictionary/{term:1}/{term", + "valid": false + }, + { + "description": "a valid uri-template without variables", + "data": "http://example.com/dictionary", + "valid": true + }, + { + "description": "a valid relative uri-template", + "data": "dictionary/{term:1}/{term}", + "valid": true + } + ] + } +] |