redskap / swagger-brake

Swagger contract checker for breaking API changes
Apache License 2.0
58 stars 16 forks source link

Exitcode for CLI when API has breaking changes #27

Closed andmos closed 4 years ago

andmos commented 4 years ago

Hi, thanks for a great project.

We want to run the swagger-brake CLI as a part of our deployment pipeline, like hit the breaks if the live API has breaking changes from what we were targeting when building. I'm looking for a way to make the CLI itself break the chain if a breaking changes is present, but as far as I have seen the exitcode of the CLI is 0 regardless of how the check goes. Is it some other way I should check? In my case, the best solution would be something like exitcode 1 for a There were breaking API changes message from the API. This would be great and save us from needing wrapper-code.

galovics commented 4 years ago

@andmos absolutely valid point. Let me take this up in the upcoming days and release a new version.

andmos commented 4 years ago

Thanks for the quick reply. I'll watch this space 😄

galovics commented 4 years ago

@andmos just released it in 1.1.0: https://github.com/redskap/swagger-brake/releases/tag/1.1.0

andmos commented 4 years ago

Thanks for the quick resolution! We'll take it in.