Merge pull request #192 from bennoleslie/patch-1
Fix Draft4Validator example code in validate.rst
This commit is contained in:
@@ -194,14 +194,14 @@ Draft 4 meta-schema, you could use:
|
|||||||
from jsonschema import Draft4Validator
|
from jsonschema import Draft4Validator
|
||||||
|
|
||||||
schema = {
|
schema = {
|
||||||
"$schema": "http://json-schema.org/schema#"
|
"$schema": "http://json-schema.org/schema#",
|
||||||
|
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"name": {"type": "string"},
|
"name": {"type": "string"},
|
||||||
"email": {"type": "string"},
|
"email": {"type": "string"},
|
||||||
}
|
},
|
||||||
"required": ["email"],
|
"required": ["email"]
|
||||||
}
|
}
|
||||||
Draft4Validator.check_schema(schema)
|
Draft4Validator.check_schema(schema)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user