Sayi / swagger-diff

:ski: Compare two swagger API specifications(1.x or v2.0)
http://deepoove.com/swagger-diff/
Apache License 2.0
276 stars 85 forks source link

Add vendor extensions #16

Closed egoodhall closed 2 years ago

egoodhall commented 6 years ago

This PR adds vendor extension support to swagger-diff. To enable the vendor extensions, you can use the same methods as normal (compareV1/compareV2), with a 3rd argument (boolean) that will enable vendor extensions if true. The original API still exists, so there shouldn't be any issues with backwards compatibility

Vendor extensions are shown in the rendered Markdown and HTML just like any other changed value, as can be seen below in the partial diff rendering (vendor extensions start with x-):



This PR addresses #15.

coveralls commented 6 years ago

Pull Request Test Coverage Report for Build 55


Changes Missing Coverage Covered Lines Changed/Added Lines %
src/main/java/com/deepoove/swagger/diff/compare/SpecificationDiff.java 25 27 92.59%
src/main/java/com/deepoove/swagger/diff/SwaggerDiff.java 7 10 70.0%
src/main/java/com/deepoove/swagger/diff/model/ChangedOperation.java 9 13 69.23%
src/main/java/com/deepoove/swagger/diff/output/MarkdownRender.java 132 139 94.96%
<!-- Total: 371 387 95.87% -->
Files with Coverage Reduction New Missed Lines %
src/main/java/com/deepoove/swagger/diff/output/MarkdownRender.java 1 96.6%
<!-- Total: 1 -->
Totals Coverage Status
Change from base Build 47: 1.05%
Covered Lines: 942
Relevant Lines: 1016

💛 - Coveralls