Skip to content

Commit 07ae108

Browse files
author
Elizabeth Mahon
committed
Change from draft 4 to draft 7 python-restx#428
1 parent 88497ce commit 07ae108

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

flask_restx/model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from .mask import Mask
1919
from .errors import abort
2020

21-
from jsonschema import Draft4Validator
21+
from jsonschema import Draft7Validator
2222
from jsonschema.exceptions import ValidationError
2323

2424
from .utils import not_none
@@ -97,7 +97,7 @@ def inherit(cls, name, *parents):
9797
return model
9898

9999
def validate(self, data, resolver=None, format_checker=None):
100-
validator = Draft4Validator(
100+
validator = Draft7Validator(
101101
self.__schema__, resolver=resolver, format_checker=format_checker
102102
)
103103
try:

flask_restx/schemas/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
except ImportError:
1717
# TODO Remove this to drop Python2 support
1818
from collections import Mapping
19-
from jsonschema import Draft4Validator
19+
from jsonschema import Draft7Validator
2020

2121
from flask_restx import errors
2222

@@ -55,7 +55,7 @@ class LazySchema(Mapping):
5555
.. versionadded:: 0.12.1
5656
"""
5757

58-
def __init__(self, filename, validator=Draft4Validator):
58+
def __init__(self, filename, validator=Draft7Validator):
5959
super(LazySchema, self).__init__()
6060
self.filename = filename
6161
self._schema = None

0 commit comments

Comments
 (0)