summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--json/tests/draft2019-09/enum.json10
-rw-r--r--json/tests/draft2019-09/optional/ecmascript-regex.json11
-rw-r--r--json/tests/draft3/ref.json14
-rw-r--r--json/tests/draft4/enum.json10
-rw-r--r--json/tests/draft4/optional/ecmascript-regex.json11
-rw-r--r--json/tests/draft4/ref.json14
-rw-r--r--json/tests/draft6/enum.json10
-rw-r--r--json/tests/draft6/optional/ecmascript-regex.json11
-rw-r--r--json/tests/draft6/ref.json14
-rw-r--r--json/tests/draft7/enum.json10
-rw-r--r--json/tests/draft7/optional/ecmascript-regex.json11
-rw-r--r--json/tests/draft7/ref.json14
12 files changed, 72 insertions, 68 deletions
diff --git a/json/tests/draft2019-09/enum.json b/json/tests/draft2019-09/enum.json
index 6844578..f085097 100644
--- a/json/tests/draft2019-09/enum.json
+++ b/json/tests/draft2019-09/enum.json
@@ -33,6 +33,16 @@
"description": "objects are deep compared",
"data": {"foo": false},
"valid": false
+ },
+ {
+ "description": "valid object matches",
+ "data": {"foo": 12},
+ "valid": true
+ },
+ {
+ "description": "extra properties in object is invalid",
+ "data": {"foo": 12, "boo": 42},
+ "valid": false
}
]
},
diff --git a/json/tests/draft2019-09/optional/ecmascript-regex.json b/json/tests/draft2019-09/optional/ecmascript-regex.json
index b9412e0..6ed6cbe 100644
--- a/json/tests/draft2019-09/optional/ecmascript-regex.json
+++ b/json/tests/draft2019-09/optional/ecmascript-regex.json
@@ -1,16 +1,5 @@
[
{
- "description": "ECMA 262 regex non-compliance",
- "schema": { "format": "regex" },
- "tests": [
- {
- "description": "ECMA 262 has no support for \\Z anchor from .NET",
- "data": "^\\S(|(.|\\n)*\\S)\\Z",
- "valid": false
- }
- ]
- },
- {
"description": "ECMA 262 regex $ does not match trailing newline",
"schema": {
"type": "string",
diff --git a/json/tests/draft3/ref.json b/json/tests/draft3/ref.json
index 74e963c..77b2947 100644
--- a/json/tests/draft3/ref.json
+++ b/json/tests/draft3/ref.json
@@ -75,13 +75,15 @@
{
"description": "escaped pointer ref",
"schema": {
- "tilde~field": {"type": "integer"},
- "slash/field": {"type": "integer"},
- "percent%field": {"type": "integer"},
+ "definitions": {
+ "tilde~field": {"type": "integer"},
+ "slash/field": {"type": "integer"},
+ "percent%field": {"type": "integer"}
+ },
"properties": {
- "tilde": {"$ref": "#/tilde~0field"},
- "slash": {"$ref": "#/slash~1field"},
- "percent": {"$ref": "#/percent%25field"}
+ "tilde": {"$ref": "#/definitions/tilde~0field"},
+ "slash": {"$ref": "#/definitions/slash~1field"},
+ "percent": {"$ref": "#/definitions/percent%25field"}
}
},
"tests": [
diff --git a/json/tests/draft4/enum.json b/json/tests/draft4/enum.json
index 6844578..f085097 100644
--- a/json/tests/draft4/enum.json
+++ b/json/tests/draft4/enum.json
@@ -33,6 +33,16 @@
"description": "objects are deep compared",
"data": {"foo": false},
"valid": false
+ },
+ {
+ "description": "valid object matches",
+ "data": {"foo": 12},
+ "valid": true
+ },
+ {
+ "description": "extra properties in object is invalid",
+ "data": {"foo": 12, "boo": 42},
+ "valid": false
}
]
},
diff --git a/json/tests/draft4/optional/ecmascript-regex.json b/json/tests/draft4/optional/ecmascript-regex.json
index b9412e0..6ed6cbe 100644
--- a/json/tests/draft4/optional/ecmascript-regex.json
+++ b/json/tests/draft4/optional/ecmascript-regex.json
@@ -1,16 +1,5 @@
[
{
- "description": "ECMA 262 regex non-compliance",
- "schema": { "format": "regex" },
- "tests": [
- {
- "description": "ECMA 262 has no support for \\Z anchor from .NET",
- "data": "^\\S(|(.|\\n)*\\S)\\Z",
- "valid": false
- }
- ]
- },
- {
"description": "ECMA 262 regex $ does not match trailing newline",
"schema": {
"type": "string",
diff --git a/json/tests/draft4/ref.json b/json/tests/draft4/ref.json
index fc3e94b..f88e963 100644
--- a/json/tests/draft4/ref.json
+++ b/json/tests/draft4/ref.json
@@ -75,13 +75,15 @@
{
"description": "escaped pointer ref",
"schema": {
- "tilde~field": {"type": "integer"},
- "slash/field": {"type": "integer"},
- "percent%field": {"type": "integer"},
+ "definitions": {
+ "tilde~field": {"type": "integer"},
+ "slash/field": {"type": "integer"},
+ "percent%field": {"type": "integer"}
+ },
"properties": {
- "tilde": {"$ref": "#/tilde~0field"},
- "slash": {"$ref": "#/slash~1field"},
- "percent": {"$ref": "#/percent%25field"}
+ "tilde": {"$ref": "#/definitions/tilde~0field"},
+ "slash": {"$ref": "#/definitions/slash~1field"},
+ "percent": {"$ref": "#/definitions/percent%25field"}
}
},
"tests": [
diff --git a/json/tests/draft6/enum.json b/json/tests/draft6/enum.json
index 6844578..f085097 100644
--- a/json/tests/draft6/enum.json
+++ b/json/tests/draft6/enum.json
@@ -33,6 +33,16 @@
"description": "objects are deep compared",
"data": {"foo": false},
"valid": false
+ },
+ {
+ "description": "valid object matches",
+ "data": {"foo": 12},
+ "valid": true
+ },
+ {
+ "description": "extra properties in object is invalid",
+ "data": {"foo": 12, "boo": 42},
+ "valid": false
}
]
},
diff --git a/json/tests/draft6/optional/ecmascript-regex.json b/json/tests/draft6/optional/ecmascript-regex.json
index b9412e0..6ed6cbe 100644
--- a/json/tests/draft6/optional/ecmascript-regex.json
+++ b/json/tests/draft6/optional/ecmascript-regex.json
@@ -1,16 +1,5 @@
[
{
- "description": "ECMA 262 regex non-compliance",
- "schema": { "format": "regex" },
- "tests": [
- {
- "description": "ECMA 262 has no support for \\Z anchor from .NET",
- "data": "^\\S(|(.|\\n)*\\S)\\Z",
- "valid": false
- }
- ]
- },
- {
"description": "ECMA 262 regex $ does not match trailing newline",
"schema": {
"type": "string",
diff --git a/json/tests/draft6/ref.json b/json/tests/draft6/ref.json
index 8eaba56..0138382 100644
--- a/json/tests/draft6/ref.json
+++ b/json/tests/draft6/ref.json
@@ -75,13 +75,15 @@
{
"description": "escaped pointer ref",
"schema": {
- "tilde~field": {"type": "integer"},
- "slash/field": {"type": "integer"},
- "percent%field": {"type": "integer"},
+ "definitions": {
+ "tilde~field": {"type": "integer"},
+ "slash/field": {"type": "integer"},
+ "percent%field": {"type": "integer"}
+ },
"properties": {
- "tilde": {"$ref": "#/tilde~0field"},
- "slash": {"$ref": "#/slash~1field"},
- "percent": {"$ref": "#/percent%25field"}
+ "tilde": {"$ref": "#/definitions/tilde~0field"},
+ "slash": {"$ref": "#/definitions/slash~1field"},
+ "percent": {"$ref": "#/definitions/percent%25field"}
}
},
"tests": [
diff --git a/json/tests/draft7/enum.json b/json/tests/draft7/enum.json
index 6844578..f085097 100644
--- a/json/tests/draft7/enum.json
+++ b/json/tests/draft7/enum.json
@@ -33,6 +33,16 @@
"description": "objects are deep compared",
"data": {"foo": false},
"valid": false
+ },
+ {
+ "description": "valid object matches",
+ "data": {"foo": 12},
+ "valid": true
+ },
+ {
+ "description": "extra properties in object is invalid",
+ "data": {"foo": 12, "boo": 42},
+ "valid": false
}
]
},
diff --git a/json/tests/draft7/optional/ecmascript-regex.json b/json/tests/draft7/optional/ecmascript-regex.json
index b9412e0..6ed6cbe 100644
--- a/json/tests/draft7/optional/ecmascript-regex.json
+++ b/json/tests/draft7/optional/ecmascript-regex.json
@@ -1,16 +1,5 @@
[
{
- "description": "ECMA 262 regex non-compliance",
- "schema": { "format": "regex" },
- "tests": [
- {
- "description": "ECMA 262 has no support for \\Z anchor from .NET",
- "data": "^\\S(|(.|\\n)*\\S)\\Z",
- "valid": false
- }
- ]
- },
- {
"description": "ECMA 262 regex $ does not match trailing newline",
"schema": {
"type": "string",
diff --git a/json/tests/draft7/ref.json b/json/tests/draft7/ref.json
index 5a8602e..01ba9fa 100644
--- a/json/tests/draft7/ref.json
+++ b/json/tests/draft7/ref.json
@@ -75,13 +75,15 @@
{
"description": "escaped pointer ref",
"schema": {
- "tilde~field": {"type": "integer"},
- "slash/field": {"type": "integer"},
- "percent%field": {"type": "integer"},
+ "definitions": {
+ "tilde~field": {"type": "integer"},
+ "slash/field": {"type": "integer"},
+ "percent%field": {"type": "integer"}
+ },
"properties": {
- "tilde": {"$ref": "#/tilde~0field"},
- "slash": {"$ref": "#/slash~1field"},
- "percent": {"$ref": "#/percent%25field"}
+ "tilde": {"$ref": "#/definitions/tilde~0field"},
+ "slash": {"$ref": "#/definitions/slash~1field"},
+ "percent": {"$ref": "#/definitions/percent%25field"}
}
},
"tests": [