diff options
Diffstat (limited to 'src/test/resources/draft4/relativeRefRemote.json')
-rw-r--r-- | src/test/resources/draft4/relativeRefRemote.json | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/src/test/resources/draft4/relativeRefRemote.json b/src/test/resources/draft4/relativeRefRemote.json new file mode 100644 index 0000000..00df5ae --- /dev/null +++ b/src/test/resources/draft4/relativeRefRemote.json @@ -0,0 +1,123 @@ +[ + { + "description": "remote ref", + "schema": { + "$ref": "integer.json" + }, + "tests": [ + { + "description": "remote ref valid", + "data": 1, + "valid": true + }, + { + "description": "remote ref invalid", + "data": "a", + "valid": false + } + ] + }, + { + "description": "fragment within remote ref", + "schema": { + "$ref": "subSchemas.json#/integer" + }, + "tests": [ + { + "description": "remote fragment valid", + "data": 1, + "valid": true + }, + { + "description": "remote fragment invalid", + "data": "a", + "valid": false + } + ] + }, + { + "description": "ref within remote ref", + "schema": { + "$ref": "refRemoteSchema.json" + }, + "tests": [ + { + "description": "ref within ref valid", + "data": 1, + "valid": true + }, + { + "description": "ref within ref invalid", + "data": "a", + "valid": false + } + ] + }, + { + "description": "change resolution scope", + "schema": { + "items": { + "id": "extra/folder/", + "items": { + "$ref": "folderInteger.json" + } + } + }, + "tests": [ + { + "description": "changed scope ref valid", + "data": [ + [ + 1 + ] + ], + "valid": true + }, + { + "description": "changed scope ref invalid", + "data": [ + [ + "a" + ] + ], + "valid": false + } + ] + }, + { + "description": "sub directory reference with ref", + "schema": { + "$ref": "self_ref/../subSchemas.json#/integer" + }, + "tests": [ + { + "description": "remote fragment valid", + "data": 1, + "valid": true + }, + { + "description": "remote fragment invalid", + "data": "a", + "valid": false + } + ] + }, + { + "description": "domain reference with ref", + "schema": { + "$ref": "/draft4/integer.json" + }, + "tests": [ + { + "description": "remote ref valid", + "data": 1, + "valid": true + }, + { + "description": "remote ref invalid", + "data": "a", + "valid": false + } + ] + } +] |