civisanalytics / swagger-diff

Utility for comparing two Swagger specifications.
BSD 3-Clause "New" or "Revised" License
264 stars 32 forks source link

swagger-diff doesn't return any output #39

Closed AntonBakaev closed 7 years ago

AntonBakaev commented 7 years ago

Hello, I'm trying to compare two different schemes, but swagger-diff doesn't return any output.

I'm attaching two files with schemes. files.zip

jeffreyc commented 7 years ago

Thank you for your feedback! Based on the attached specs, this is the expected behavior.

You added two properties to the SetBasketPayDetailRequest definition, but that definition isn't used by any endpoints. Since changes to unused definitions don't impact the API, they won't be detected by Swagger::Diff. If you add that definition as a parameter or response, Swagger::Diff will correctly detect the new properties.

n.b., the only changes are new optional properties, so swagger-diff OLD_2_0.json NEW_2_0.json will not return anything even if you add the definition as a parameter or response, as new optional properties are backwards compatible. You'll need to use the -c argument (swagger-diff -c OLD_2_0.json NEW_2_0.json) to enumerate all changes.

I'm going to close this issue, but please comment on this issue or file another issue as appropriate if you encounter any other problems with Swagger::Diff.

AntonBakaev commented 7 years ago

Great thanks for help, issue resolved.