mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-12-11 06:55:40 +00:00
54 lines
1.3 KiB
JSON
54 lines
1.3 KiB
JSON
[
|
|
{
|
|
"description": "required validation",
|
|
"schema": {
|
|
"properties": {
|
|
"foo": {"required" : true},
|
|
"bar": {}
|
|
}
|
|
},
|
|
"tests": [
|
|
{
|
|
"description": "present required property is valid",
|
|
"data": {"foo": 1},
|
|
"valid": true
|
|
},
|
|
{
|
|
"description": "non-present required property is invalid",
|
|
"data": {"bar": 1},
|
|
"valid": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"description": "required default validation",
|
|
"schema": {
|
|
"properties": {
|
|
"foo": {}
|
|
}
|
|
},
|
|
"tests": [
|
|
{
|
|
"description": "not required by default",
|
|
"data": {},
|
|
"valid": true
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"description": "required explicitly false validation",
|
|
"schema": {
|
|
"properties": {
|
|
"foo": {"required": false}
|
|
}
|
|
},
|
|
"tests": [
|
|
{
|
|
"description": "not required if required is false",
|
|
"data": {},
|
|
"valid": true
|
|
}
|
|
]
|
|
}
|
|
]
|