summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/rapidjson/bin/jsonschema/tests/draft3/disallow.json
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/rapidjson/bin/jsonschema/tests/draft3/disallow.json')
-rw-r--r--3rdparty/rapidjson/bin/jsonschema/tests/draft3/disallow.json80
1 files changed, 80 insertions, 0 deletions
diff --git a/3rdparty/rapidjson/bin/jsonschema/tests/draft3/disallow.json b/3rdparty/rapidjson/bin/jsonschema/tests/draft3/disallow.json
new file mode 100644
index 00000000000..a5c9d90ccee
--- /dev/null
+++ b/3rdparty/rapidjson/bin/jsonschema/tests/draft3/disallow.json
@@ -0,0 +1,80 @@
+[
+ {
+ "description": "disallow",
+ "schema": {
+ "disallow": "integer"
+ },
+ "tests": [
+ {
+ "description": "allowed",
+ "data": "foo",
+ "valid": true
+ },
+ {
+ "description": "disallowed",
+ "data": 1,
+ "valid": false
+ }
+ ]
+ },
+ {
+ "description": "multiple disallow",
+ "schema": {
+ "disallow": ["integer", "boolean"]
+ },
+ "tests": [
+ {
+ "description": "valid",
+ "data": "foo",
+ "valid": true
+ },
+ {
+ "description": "mismatch",
+ "data": 1,
+ "valid": false
+ },
+ {
+ "description": "other mismatch",
+ "data": true,
+ "valid": false
+ }
+ ]
+ },
+ {
+ "description": "multiple disallow subschema",
+ "schema": {
+ "disallow":
+ ["string",
+ {
+ "type": "object",
+ "properties": {
+ "foo": {
+ "type": "string"
+ }
+ }
+ }]
+ },
+ "tests": [
+ {
+ "description": "match",
+ "data": 1,
+ "valid": true
+ },
+ {
+ "description": "other match",
+ "data": {"foo": 1},
+ "valid": true
+ },
+ {
+ "description": "mismatch",
+ "data": "foo",
+ "valid": false
+ },
+ {
+ "description": "other mismatch",
+ "data": {"foo": "bar"},
+ "valid": false
+ }
+ ]
+ }
+]