Update from upstream #11
@ -450,11 +450,7 @@ def _extend_with_default_and_alias(validator_class, offline=False):
|
|||||||
def is_string_type(checker, instance):
|
def is_string_type(checker, instance):
|
||||||
return isinstance(instance, six.string_types)
|
return isinstance(instance, six.string_types)
|
||||||
|
|
||||||
# type_checker = draft4_type_checker.redefine_many(
|
validator = jsonschema.validators.extend(
|
||||||
# {"array": is_array, "regex": is_string_type, "url": is_string_type}
|
|
||||||
# )
|
|
||||||
|
|
||||||
return jsonschema.validators.extend(
|
|
||||||
validator_class,
|
validator_class,
|
||||||
{
|
{
|
||||||
"properties": properties_validator,
|
"properties": properties_validator,
|
||||||
@ -464,8 +460,13 @@ def _extend_with_default_and_alias(validator_class, offline=False):
|
|||||||
"additionalProperties": _validate_additional_properties,
|
"additionalProperties": _validate_additional_properties,
|
||||||
"anyOf": _validate_any_of,
|
"anyOf": _validate_any_of,
|
||||||
},
|
},
|
||||||
# type_checker=type_checker,
|
|
||||||
)
|
)
|
||||||
|
validator.DEFAULT_TYPES.update({
|
||||||
|
"array": (list, tuple),
|
||||||
|
"regex": six.string_types,
|
||||||
|
"url": six.string_types,
|
||||||
|
})
|
||||||
|
return validator
|
||||||
|
|
||||||
|
|
||||||
class ConfigDeprecation(jsonschema.exceptions.ValidationError):
|
class ConfigDeprecation(jsonschema.exceptions.ValidationError):
|
||||||
|
Loading…
Reference in New Issue
Block a user