Yelp / swagger-spec-compatibility

Python library to check Swagger Spec backward compatibility
https://swagger-spec-compatibility.readthedocs.org
Apache License 2.0
20 stars 8 forks source link

Fix swagger aware walker #7

Closed macisamuele closed 5 years ago

macisamuele commented 5 years ago

The goal of this PR is to fix a bug noticed internally that is triggered once a parameter is removed from a request. Due to the nature of the parameters definition (being an array) removing a parameter has the potential to produce changed type alerts due to the fact that all the parameters of the new specs are shifted respect the old specs (check the added integration test for a more concrete example).

In the context of this PR:

NOTE: tests will most probably be red due to coverage

codecov[bot] commented 5 years ago

Codecov Report

Merging #7 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master     #7   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          58     58           
  Lines        1724   1778   +54     
  Branches      104    113    +9     
=====================================
+ Hits         1724   1778   +54
Impacted Files Coverage Δ
swagger_spec_compatibility/cli/run.py 100% <100%> (ø) :arrow_up:
swagger_spec_compatibility/walkers/enum_values.py 100% <100%> (ø) :arrow_up:
...objects_with_additional_properties_set_to_false.py 100% <100%> (ø) :arrow_up:
swagger_spec_compatibility/cli/__init__.py 100% <100%> (ø) :arrow_up:
...pec_compatibility/walkers/additional_properties.py 100% <100%> (ø) :arrow_up:
...r_spec_compatibility/walkers/request_parameters.py 100% <100%> (ø) :arrow_up:
...bility/rules/added_required_property_in_request.py 100% <100%> (ø) :arrow_up:
swagger_spec_compatibility/__main__.py 100% <100%> (ø) :arrow_up:
...y/rules/removed_required_property_from_response.py 100% <100%> (ø) :arrow_up:
swagger_spec_compatibility/cli/common.py 100% <100%> (ø) :arrow_up:
... and 19 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 45672c9...18ec3dd. Read the comment docs.