Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for beta API #19

Closed
ChristianLutz opened this issue May 3, 2019 · 3 comments
Closed

Support for beta API #19

ChristianLutz opened this issue May 3, 2019 · 3 comments
Labels

Comments

@ChristianLutz
Copy link

Hello,

this is an idea for a feature request.

Let's assume I do have a stable 1.0 API. Now we would like to provide a new endpoint, but in the current state we are not sure if the new API will work properly. So we release the new API 1.1 and tell the user to play around. But now, if we have to change the API because of user feedback for version 1.2 swagger-brake will fail as expected.

However If we could annotate the API as beta in the first place it would be possible to identify this API and ignore any breaking changes.

The Problem is swagger doesn't support a beta tag yet. See here. As metioned in the issue it is possible to add a vendor extension

This could be something like:

x-brake-beta: true
x-brake-beta-api-name: uniqeXXX

I guess the x-brake-beta-api-name is required to ensure the same api's are compared. But I am not sure, maybe x-brake-beta is enough.

The following state could appear:

          -> Beta API -> OK // added
 Beta API -> Beta API -> OK // changed
 Beta API -> API -> OK      // stable
 Beta API ->     -> OK      // removed
 API -> Beta API -> FAIL    // brake

kind regards
Christian

@galovics
Copy link
Member

Hi @ChristianLutz, it's a good idea, although I would rather introduce a configuration parameter for the specific attribute which denotes the beta property of the API instead of hardcoding it. I'll take a look.

@galovics
Copy link
Member

@ChristianLutz will be included in the next release. Thanks for the idea.

@galovics
Copy link
Member

FYI @ChristianLutz here's the relevant part from the readme: https://github.com/redskap/swagger-brake#beta-api-support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants