Schema a now "parsed" into C++-validator-objects in a first step and then validation takes place with these objects. Errors are now handled via a user-provided error-handler allowing the user to collect all errors at once or bail out when a certain threshold is reached. Fixes #36 and #8. One (sub-)schema can now be referenced with different URIs. Fixes #9 JSON schema draft 7 is now supported. Fixes #35
31 lines
775 B
JSON
31 lines
775 B
JSON
[
|
|
{
|
|
"description": "exclusiveMaximum validation",
|
|
"schema": {
|
|
"exclusiveMaximum": 3.0
|
|
},
|
|
"tests": [
|
|
{
|
|
"description": "below the exclusiveMaximum is valid",
|
|
"data": 2.2,
|
|
"valid": true
|
|
},
|
|
{
|
|
"description": "boundary point is invalid",
|
|
"data": 3.0,
|
|
"valid": false
|
|
},
|
|
{
|
|
"description": "above the exclusiveMaximum is invalid",
|
|
"data": 3.5,
|
|
"valid": false
|
|
},
|
|
{
|
|
"description": "ignores non-numbers",
|
|
"data": "x",
|
|
"valid": true
|
|
}
|
|
]
|
|
}
|
|
]
|