Skip to content

Commit

Permalink
required
Browse files Browse the repository at this point in the history
  • Loading branch information
Julian committed Oct 7, 2012
1 parent 91e57ae commit 7829853
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions tests/draft3/required.json
@@ -0,0 +1,53 @@
[
{
"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
}
]
}
]

0 comments on commit 7829853

Please sign in to comment.