Skip to content

Commit

Permalink
update JSONSchema to Draft v7 (Kinto#1850)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterr101 authored and leplatrem committed Nov 29, 2018
1 parent ab5abc6 commit a42bc66
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
3 changes: 1 addition & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ This document describes changes between each past release.
**Internal changes**

- Build the admin on the CI. (#1857)
- Migrate JSON Hyper-Schema to Draft-07 (#1808)

**Documentation**

Expand All @@ -37,12 +38,10 @@ This document describes changes between each past release.
- Fix missing favicon and inline images in kinto-admin plugin

**Internal changes**

- Use mock from the standard library.
- Blackify the whole code base (#1799, huge thanks to @Cnidarias for this!)
- Upgrade kinto-admin to v1.22


11.0.0 (2018-10-09)
-------------------

Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ Contributors
* Pascal Roessner <[email protected]>
* PeriGK <[email protected]>
* Peter Bengtsson <[email protected]>
* Peter Rassias <[email protected]>
* realsumit <[email protected]>
* Rektide <[email protected]>
* Rémy Hubscher <[email protected]>
Expand Down
4 changes: 2 additions & 2 deletions kinto/schema_validation.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import colander
from jsonschema import Draft4Validator, ValidationError, SchemaError, RefResolutionError, validate
from jsonschema import Draft7Validator, ValidationError, SchemaError, RefResolutionError, validate
from pyramid.settings import asbool

from kinto.core import utils
Expand Down Expand Up @@ -27,7 +27,7 @@ def deserialize(self, cstruct=colander.null):

def check_schema(data):
try:
Draft4Validator.check_schema(data)
Draft7Validator.check_schema(data)
except SchemaError as e:
message = e.path.pop() + e.message
raise ValidationError(message)
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ idna==2.7
iso8601==0.1.12
jsonpatch==1.23
jsonpointer==2.0
jsonschema==2.6.0
jsonschema==3.0.0a3
logging-color-formatter==1.0.2
newrelic==4.6.0.106
PasteDeploy==1.5.2
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ commands =
py.test {posargs}
deps =
bravado_core
jsonschema==3.0.0a3
pytest==3.3.2
pytest-cache
pytest-cover
Expand Down

0 comments on commit a42bc66

Please sign in to comment.