diff options
Diffstat (limited to 'src/s3select/rapidjson/bin/jsonschema/tests/draft3/required.json')
-rw-r--r-- | src/s3select/rapidjson/bin/jsonschema/tests/draft3/required.json | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/src/s3select/rapidjson/bin/jsonschema/tests/draft3/required.json b/src/s3select/rapidjson/bin/jsonschema/tests/draft3/required.json new file mode 100644 index 000000000..aaaf02427 --- /dev/null +++ b/src/s3select/rapidjson/bin/jsonschema/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 + } + ] + } +] |