summaryrefslogtreecommitdiff
path: root/json
diff options
context:
space:
mode:
authorJulian Berman <Julian@GrayVines.com>2020-02-21 08:37:27 -0500
committerJulian Berman <Julian@GrayVines.com>2020-02-21 08:37:27 -0500
commit19884bbe792b62a19c8bb87ad5145932dc66b3bf (patch)
treef4334cedd5b7c734374aebfc1665d48b25a07b46 /json
parente020411b046f5629c30f080c690221454985f8b4 (diff)
parent7f35a52473560f6d8ec378f92a864fe1c4a9b3a2 (diff)
downloadjsonschema-19884bbe792b62a19c8bb87ad5145932dc66b3bf.tar.gz
Merge commit '7f35a52473560f6d8ec378f92a864fe1c4a9b3a2'
* commit '7f35a52473560f6d8ec378f92a864fe1c4a9b3a2': Squashed 'json/' changes from 6c00de64..a863dbab
Diffstat (limited to 'json')
-rw-r--r--json/.github/workflows/ci.yml2
-rw-r--r--json/tests/draft2019-09/const.json17
-rw-r--r--json/tests/draft6/const.json17
-rw-r--r--json/tests/draft7/const.json17
4 files changed, 49 insertions, 4 deletions
diff --git a/json/.github/workflows/ci.yml b/json/.github/workflows/ci.yml
index 7422165..83d3040 100644
--- a/json/.github/workflows/ci.yml
+++ b/json/.github/workflows/ci.yml
@@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v1
+ - uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
diff --git a/json/tests/draft2019-09/const.json b/json/tests/draft2019-09/const.json
index c089625..c741f60 100644
--- a/json/tests/draft2019-09/const.json
+++ b/json/tests/draft2019-09/const.json
@@ -126,7 +126,7 @@
]
},
{
- "description": "const with 0 does not match false",
+ "description": "const with 0 does not match other zero-like types",
"schema": {"const": 0},
"tests": [
{
@@ -143,6 +143,21 @@
"description": "float zero is valid",
"data": 0.0,
"valid": true
+ },
+ {
+ "description": "empty object is invalid",
+ "data": {},
+ "valid": false
+ },
+ {
+ "description": "empty array is invalid",
+ "data": [],
+ "valid": false
+ },
+ {
+ "description": "empty string is invalid",
+ "data": "",
+ "valid": false
}
]
},
diff --git a/json/tests/draft6/const.json b/json/tests/draft6/const.json
index c089625..c741f60 100644
--- a/json/tests/draft6/const.json
+++ b/json/tests/draft6/const.json
@@ -126,7 +126,7 @@
]
},
{
- "description": "const with 0 does not match false",
+ "description": "const with 0 does not match other zero-like types",
"schema": {"const": 0},
"tests": [
{
@@ -143,6 +143,21 @@
"description": "float zero is valid",
"data": 0.0,
"valid": true
+ },
+ {
+ "description": "empty object is invalid",
+ "data": {},
+ "valid": false
+ },
+ {
+ "description": "empty array is invalid",
+ "data": [],
+ "valid": false
+ },
+ {
+ "description": "empty string is invalid",
+ "data": "",
+ "valid": false
}
]
},
diff --git a/json/tests/draft7/const.json b/json/tests/draft7/const.json
index c089625..c741f60 100644
--- a/json/tests/draft7/const.json
+++ b/json/tests/draft7/const.json
@@ -126,7 +126,7 @@
]
},
{
- "description": "const with 0 does not match false",
+ "description": "const with 0 does not match other zero-like types",
"schema": {"const": 0},
"tests": [
{
@@ -143,6 +143,21 @@
"description": "float zero is valid",
"data": 0.0,
"valid": true
+ },
+ {
+ "description": "empty object is invalid",
+ "data": {},
+ "valid": false
+ },
+ {
+ "description": "empty array is invalid",
+ "data": [],
+ "valid": false
+ },
+ {
+ "description": "empty string is invalid",
+ "data": "",
+ "valid": false
}
]
},