Additional schema fixes (#17414)
This commit is contained in:
@@ -68,11 +68,7 @@ def create_validator(schema):
|
||||
schema_store = compile_schema_store()
|
||||
resolver = jsonschema.RefResolver.from_schema(schema_store[schema], store=schema_store)
|
||||
|
||||
# TODO: Remove this after the jsonschema>=4 requirement had time to reach users
|
||||
try:
|
||||
return jsonschema.Draft202012Validator(schema_store[schema], resolver=resolver).validate
|
||||
except AttributeError:
|
||||
return jsonschema.Draft7Validator(schema_store[schema], resolver=resolver).validate
|
||||
return jsonschema.Draft202012Validator(schema_store[schema], resolver=resolver).validate
|
||||
|
||||
|
||||
def validate(data, schema):
|
||||
|
Reference in New Issue
Block a user