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
33 lines
854 B
JSON
33 lines
854 B
JSON
[
|
|
{
|
|
"description": "valid definition",
|
|
"schema": {"$ref": "http://json-schema.org/draft-07/schema#"},
|
|
"tests": [
|
|
{
|
|
"description": "valid definition schema",
|
|
"data": {
|
|
"definitions": {
|
|
"foo": {"type": "integer"}
|
|
}
|
|
},
|
|
"valid": true
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"description": "invalid definition",
|
|
"schema": {"$ref": "http://json-schema.org/draft-07/schema#"},
|
|
"tests": [
|
|
{
|
|
"description": "invalid definition schema",
|
|
"data": {
|
|
"definitions": {
|
|
"foo": {"type": 1}
|
|
}
|
|
},
|
|
"valid": false
|
|
}
|
|
]
|
|
}
|
|
]
|