Merge "Revert "Fix DeprecationWarning of jsonschema""
This commit is contained in:
commit
baa3cc712c
@ -18,7 +18,7 @@ from oslo_utils import timeutils
|
|||||||
|
|
||||||
# JSON Schema validator and format checker used for JSON Schema validation
|
# JSON Schema validator and format checker used for JSON Schema validation
|
||||||
JSONSCHEMA_VALIDATOR = jsonschema.Draft4Validator
|
JSONSCHEMA_VALIDATOR = jsonschema.Draft4Validator
|
||||||
FORMAT_CHECKER = jsonschema.Draft4Validator.FORMAT_CHECKER
|
FORMAT_CHECKER = jsonschema.draft4_format_checker
|
||||||
|
|
||||||
|
|
||||||
# NOTE(gmann): Add customized format checker for 'date-time' format because:
|
# NOTE(gmann): Add customized format checker for 'date-time' format because:
|
||||||
@ -39,7 +39,7 @@ def _validate_datetime_format(instance):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
@FORMAT_CHECKER.checks('base64')
|
@jsonschema.FormatChecker.cls_checks('base64')
|
||||||
def _validate_base64_format(instance):
|
def _validate_base64_format(instance):
|
||||||
try:
|
try:
|
||||||
if isinstance(instance, str):
|
if isinstance(instance, str):
|
||||||
|
Loading…
Reference in New Issue
Block a user