update to latest JSON-Schema-Test-Suite

This commit is contained in:
Patrick Boettcher 2019-11-27 14:00:48 +01:00
parent fa978cb766
commit 2d7f190550
2 changed files with 46 additions and 4 deletions

View File

@ -202,5 +202,47 @@
"valid": false
}
]
},
{
"description": "oneOf with missing optional property",
"schema": {
"oneOf": [
{
"properties": {
"bar": true,
"baz": true
},
"required": ["bar"]
},
{
"properties": {
"foo": true
},
"required": ["foo"]
}
]
},
"tests": [
{
"description": "first oneOf valid",
"data": {"bar": 8},
"valid": true
},
{
"description": "second oneOf valid",
"data": {"foo": "foo"},
"valid": true
},
{
"description": "both oneOf valid",
"data": {"foo": "foo", "bar": 8},
"valid": false
},
{
"description": "neither oneOf valid",
"data": {"baz": "quux"},
"valid": false
}
]
}
]

View File

@ -30,20 +30,20 @@
]
},
{
"description": "ECMA 262 regex converts \\a to ascii BEL",
"description": "ECMA 262 regex converts \\t to horizontal tab",
"schema": {
"type": "string",
"pattern": "^\\a$"
"pattern": "^\\t$"
},
"tests": [
{
"description": "does not match",
"data": "\\a",
"data": "\\t",
"valid": false
},
{
"description": "matches",
"data": "\u0007",
"data": "\u0009",
"valid": true
}
]