ajv/spec/tests/issues/62_resolution_scope_change....

66 lines
1.5 KiB
JSON

[
{
"description": "change resolution scope - change filename (#62)",
"schema": {
"type" : "object",
"properties": {
"title": { "$ref": "http://localhost:1234/scope_foo.json#/definitions/bar" }
}
},
"tests": [
{
"description": "string is valid",
"data": { "title": "baz" },
"valid": true
},
{
"description": "number is invalid",
"data": { "title": 1 },
"valid": false
}
]
},
{
"description": "resolution scope change - change folder (#62)",
"schema": {
"type" : "object",
"properties": {
"list": { "$ref": "http://localhost:1234/scope_change.json#/definitions/baz" }
}
},
"tests": [
{
"description": "number is valid",
"data": { "list": [1] },
"valid": true
},
{
"description": "string is invalid",
"data": { "list": ["a"] },
"valid": false
}
]
},
{
"description": "resolution scope change - change folder in subschema (#62)",
"schema": {
"type" : "object",
"properties": {
"list": { "$ref": "http://localhost:1234/scope_change.json#/definitions/baz/bar" }
}
},
"tests": [
{
"description": "number is valid",
"data": { "list": [1] },
"valid": true
},
{
"description": "string is invalid",
"data": { "list": ["a"] },
"valid": false
}
]
}
]