mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
923 B
39 lines
923 B
[
|
|
{
|
|
"description": "required validation",
|
|
"schema": {
|
|
"properties": {
|
|
"foo": {},
|
|
"bar": {}
|
|
},
|
|
"required": ["foo"]
|
|
},
|
|
"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
|
|
}
|
|
]
|
|
}
|
|
]
|
|
|