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

Add ability to allow removal of deprecated APIs #17

Closed
dalewking opened this issue Mar 28, 2019 · 4 comments
Closed

Add ability to allow removal of deprecated APIs #17

dalewking opened this issue Mar 28, 2019 · 4 comments
Assignees
Labels
0.3.0 enhancement New feature or request

Comments

@dalewking
Copy link

Add ability to allow removal of an API previously marked as deprecated

@galovics galovics self-assigned this Mar 30, 2019
@galovics galovics added enhancement New feature or request 0.3.0 labels Mar 30, 2019
@dalewking
Copy link
Author

Thanks for adding this, but you probably should add a configuration option to enable this. Some people feel that APIs should never be deleted.

@galovics
Copy link
Member

@dalewking thanks for reporting it first of all. :-)
The OpenAPI spec allows you to deprecate APIs using the deprecated attribute on operation level. See the spec here: https://swagger.io/specification/#fixed-fields-8

Swagger Brake will check for this flag. If the old API is marked as deprecated and it got removed in the new version of the API, it won't be considered a breaking change anymore.

@dalewking
Copy link
Author

I know all of that but deprecation simply means that people should no longer use it. Actually deleting it is a breaking change and according to some (e.g. https://api-university.com/api-lifecycle/api-design/api-design-api-evolution-api-versioning/) you should never make breaking changes and would have trouble with this being the default. So it would be best to add an option to enable this behavior

@galovics
Copy link
Member

From my point of view, if anyone deletes an API which is already marked as deprecated, it might get deleted without any problem. Of course if people doesn't give the necessary time for the clients to switch from API1 to API2, it might get messy.
Although a switch might be useful just to have the possibility for changing this behavior. I'll add it and make the behavior default and one can override it to explicitly mark that deprecated API deletion is not allowed.

galovics added a commit that referenced this issue Mar 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.3.0 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants