intellij-swagger icon indicating copy to clipboard operation
intellij-swagger copied to clipboard

Add a spec diff tool

Open cognifloyd opened this issue 6 years ago • 1 comments

With SwaggerHub, the diff tool is helpful. In PyCharm, I can use "compare files" to get a line-based diff, which is all SwaggerHub does anyway.

A more intelligent diff might be useful in writing and comparing versions of specs (or when consolidating/merging specs written in part by multiple people). I've seen (but have not used) these:

  • https://github.com/civisanalytics/swagger-diff Ruby-based: only serves as possible inspiration interesting use-case - determining backwards compatibility of spec versions
  • https://github.com/Azure/openapi-diff C#-based: possibly additional inspiration a set of specific/numbered validation-like rules
  • https://github.com/quen2404/openapi-diff Java-based: could be embedded as a dependency Only for OpenAPI 3.0 specs right now (Issue and WIP PR for 2.0) Hopefully, instead of generating a markdown or html diff, this details could be extracted and embedded in something that allows the differences to be highlighted or to hyperlink sections in whatever output is generated so you can jump to the relevant sections in the specs.

cognifloyd avatar Jan 18 '19 15:01 cognifloyd

This sounds like a good idea :) would you be interested in contributing to the feature?

semonte avatar Jan 24 '19 06:01 semonte