summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Berman <Julian@GrayVines.com>2020-09-05 07:55:55 -0400
committerJulian Berman <Julian@GrayVines.com>2020-09-05 07:55:55 -0400
commitddcc2e23dfd1cd5c5e60403bca32b36bf2c2f50c (patch)
treea9db919dc2684a6a2f94c55376b6fa797dc2f28a
parent702e9b4bf2e80923b0df6742dd3bf72cb9ef9ebb (diff)
parent1a4ea00149e70383506f24648bfb52a2278fe3f7 (diff)
downloadjsonschema-ddcc2e23dfd1cd5c5e60403bca32b36bf2c2f50c.tar.gz
Merge commit '1a4ea00149e70383506f24648bfb52a2278fe3f7' into master
* commit '1a4ea00149e70383506f24648bfb52a2278fe3f7': Squashed 'json/' changes from fce9e9b3..21555a85
-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": [