pb33f / openapi-changes

The world's sexiest OpenAPI breaking changes detector. Discover what changed between two OpenAPI specs, or a single spec over time. Supports OpenAPI 3.1, 3.0 and Swagger
https://pb33f.io/openapi-changes/
Other
180 stars 16 forks source link

Support left and right comparison between commits #85

Open jackfrankland opened 9 months ago

jackfrankland commented 9 months ago

Hi!

There are two use cases that I'd love this tool to cater for:

  1. Before committing changes, a check to see I have not introduced breaking changes to the api spec, either against head or to another branch (i.e. main)
  2. The CI pipeline to detect breaking changes between the head and the base branch on PR

I believe these could potentially be achieved by allowing to optionally specify the git commit/reference:

openapi-changes <revision>:openapi.yaml ./openapi.yaml