summaryrefslogtreecommitdiff
path: root/json/tests/draft-next/optional/format/uri-template.json
diff options
context:
space:
mode:
Diffstat (limited to 'json/tests/draft-next/optional/format/uri-template.json')
-rw-r--r--json/tests/draft-next/optional/format/uri-template.json61
1 files changed, 61 insertions, 0 deletions
diff --git a/json/tests/draft-next/optional/format/uri-template.json b/json/tests/draft-next/optional/format/uri-template.json
new file mode 100644
index 0000000..f57d62d
--- /dev/null
+++ b/json/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
+ }
+ ]
+ }
+]