Initial Commit - Lesson 31 (Commit #1)
This commit is contained in:
94
Plugins/GameLiftServerSDK/ThirdParty/rapidjson/bin/jsonschema/tests/draft3/extends.json
vendored
Normal file
94
Plugins/GameLiftServerSDK/ThirdParty/rapidjson/bin/jsonschema/tests/draft3/extends.json
vendored
Normal file
@@ -0,0 +1,94 @@
|
||||
[
|
||||
{
|
||||
"description": "extends",
|
||||
"schema": {
|
||||
"properties": {"bar": {"type": "integer", "required": true}},
|
||||
"extends": {
|
||||
"properties": {
|
||||
"foo": {"type": "string", "required": true}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tests": [
|
||||
{
|
||||
"description": "extends",
|
||||
"data": {"foo": "baz", "bar": 2},
|
||||
"valid": true
|
||||
},
|
||||
{
|
||||
"description": "mismatch extends",
|
||||
"data": {"foo": "baz"},
|
||||
"valid": false
|
||||
},
|
||||
{
|
||||
"description": "mismatch extended",
|
||||
"data": {"bar": 2},
|
||||
"valid": false
|
||||
},
|
||||
{
|
||||
"description": "wrong type",
|
||||
"data": {"foo": "baz", "bar": "quux"},
|
||||
"valid": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "multiple extends",
|
||||
"schema": {
|
||||
"properties": {"bar": {"type": "integer", "required": true}},
|
||||
"extends" : [
|
||||
{
|
||||
"properties": {
|
||||
"foo": {"type": "string", "required": true}
|
||||
}
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"baz": {"type": "null", "required": true}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"tests": [
|
||||
{
|
||||
"description": "valid",
|
||||
"data": {"foo": "quux", "bar": 2, "baz": null},
|
||||
"valid": true
|
||||
},
|
||||
{
|
||||
"description": "mismatch first extends",
|
||||
"data": {"bar": 2, "baz": null},
|
||||
"valid": false
|
||||
},
|
||||
{
|
||||
"description": "mismatch second extends",
|
||||
"data": {"foo": "quux", "bar": 2},
|
||||
"valid": false
|
||||
},
|
||||
{
|
||||
"description": "mismatch both",
|
||||
"data": {"bar": 2},
|
||||
"valid": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "extends simple types",
|
||||
"schema": {
|
||||
"minimum": 20,
|
||||
"extends": {"maximum": 30}
|
||||
},
|
||||
"tests": [
|
||||
{
|
||||
"description": "valid",
|
||||
"data": 25,
|
||||
"valid": true
|
||||
},
|
||||
{
|
||||
"description": "mismatch extends",
|
||||
"data": 35,
|
||||
"valid": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user