json-schema-validator/test/JSON-Schema-Test-Suite/tests/draft7/optional/format/uri-reference.json
Patrick Boettcher 7beb40bc61 Complete rewrite of the validator - aiming a 2.0-release
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
2018-12-27 16:59:19 +01:00

44 lines
1.2 KiB
JSON

[
{
"description": "validation of URI References",
"schema": {"format": "uri-reference"},
"tests": [
{
"description": "a valid URI",
"data": "http://foo.bar/?baz=qux#quux",
"valid": true
},
{
"description": "a valid protocol-relative URI Reference",
"data": "//foo.bar/?baz=qux#quux",
"valid": true
},
{
"description": "a valid relative URI Reference",
"data": "/abc",
"valid": true
},
{
"description": "an invalid URI Reference",
"data": "\\\\WINDOWS\\fileshare",
"valid": false
},
{
"description": "a valid URI Reference",
"data": "abc",
"valid": true
},
{
"description": "a valid URI fragment",
"data": "#fragment",
"valid": true
},
{
"description": "an invalid URI fragment",
"data": "#frag\\ment",
"valid": false
}
]
}
]