1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- [
- {
- "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
- }
- ]
- }
- ]
|