Yelp / bravado-core

Other
109 stars 98 forks source link

Remove direct usage of jsonschema._validators #304

Closed macisamuele closed 6 years ago

macisamuele commented 6 years ago

Fixes: #303

The goal of this PR is to guarantee bravado-core interoperability with jsonschema version 3 (released only in alpha for now). The new release is changing how the validator methods are named within jsonschema._validators package. In general we should not import private definitions, but this was done.

In order to make bravado-core able to work with the current jsonschema releases and the new release (alpha released) we need to call the original validators using a different approach. Instead of calling validator methods from the private module we could extract them from Draft4Validator.VALIDATORS class attribute (by using only public informations).

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-0.1%) to 98.327% when pulling d2e9ba74dd4ecabbfffb4b8e905330f7926ef65f on macisamuele:maci-fix-303 into 68e98ab85dc4a50cf5a9ffe7fb627d0575387704 on Yelp:master.

macisamuele commented 6 years ago

Updated pre-commit hooks and fixed build (that was failing also on master).

gabisurita commented 6 years ago

@macisamuele Thank you! Do you know when you expect to release this fix?