Skip to content

Commit

Permalink
Change from draft 4 to draft 7 python-restx#428
Browse files Browse the repository at this point in the history
  • Loading branch information
Elizabeth Mahon committed Apr 12, 2022
1 parent 88497ce commit 07ae108
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions flask_restx/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from .mask import Mask
from .errors import abort

from jsonschema import Draft4Validator
from jsonschema import Draft7Validator
from jsonschema.exceptions import ValidationError

from .utils import not_none
Expand Down Expand Up @@ -97,7 +97,7 @@ def inherit(cls, name, *parents):
return model

def validate(self, data, resolver=None, format_checker=None):
validator = Draft4Validator(
validator = Draft7Validator(
self.__schema__, resolver=resolver, format_checker=format_checker
)
try:
Expand Down
4 changes: 2 additions & 2 deletions flask_restx/schemas/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
except ImportError:
# TODO Remove this to drop Python2 support
from collections import Mapping
from jsonschema import Draft4Validator
from jsonschema import Draft7Validator

from flask_restx import errors

Expand Down Expand Up @@ -55,7 +55,7 @@ class LazySchema(Mapping):
.. versionadded:: 0.12.1
"""

def __init__(self, filename, validator=Draft4Validator):
def __init__(self, filename, validator=Draft7Validator):
super(LazySchema, self).__init__()
self.filename = filename
self._schema = None
Expand Down

0 comments on commit 07ae108

Please sign in to comment.