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

CORESERV-10844 Fix ChangedAdditionalPropertiesToFalse Rule #36

Closed ATRAN2 closed 3 years ago

ATRAN2 commented 3 years ago

Description

Fix the rule so that it only triggers when additionalProperties is set to False as the rule describes. Before this rule would trigger upon any change to additionalProperties, even if it's just a change in shape of an additionalProperties object which led to a lot of false alarms. additionalProperties can be an object, and changing it can be a backwards compatible operation.

Notes for the reviewer

additional_properties_diff.additionalProperties has two fields, old and new. Those contain the additionalProperties values between the old spec and new spec respectively for a diff in an additionalProperties object.

ATRAN2 commented 3 years ago

Hey @macisamuele if you have some extra time, can you take a look at this PR one more time? Only if you're not busy, I can ping some other folks otherwise Thanks!

ATRAN2 commented 3 years ago

lgtm

Sorry for the delay on the response :)

Oh no problem, thank you for reviewing the change!