Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,19 @@ Releases prior to 0.3.0 were “best effort” filled out, but are missing
some info. If you see your contribution missing info, please open a PR
on the Changelog!

.. _section-0.5.2:
0.5.2
-----

.. _enhancements-0.5.2:

Enhancements
~~~~~~~~~~~~

::

* Update json-schema from Draft 4 to Draft 7 (#428) [emahon]

.. _section-0.5.1:
0.5.1
-----
Expand Down
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