API versioning with api-supported-versions header #951
Replies: 1 comment
-
There is a conflation between the meaning of API with respect to an endpoint. While it's true that a single endpoint can be an API, it's not all that practical. Most APIs are a collection of endpoints. For example, Collation is performed by the logical name of the API; not the route template. Route templates cannot safely be collated. For example, An API and its versions make up a lot more than just an endpoint. An API version cannot not define the entire policy associated with an API. OpenAPI and (the new) sunset policies provide additional context for client that you just can't get from a list of supported and deprecated versions. In this scenario, if I hope that helps and clarifies a few things. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm curious if I'm doing something wrong with versioning my API.
Currently I've set up this:
With these endpoints:
So now I've got these endpoints showing up correctly in Swagger:
Only when I call the endpoint to get the user, which only has a v1, I get the response
api-supported-versions: 1.0, 2.0
which should not happen right? Should it not only show1.0
here?Versioning the entire api makes no sense to me but versioning endpoint does. Otherwise with every breaking change the entire api endpoint gets upped 1 version. Even if those endpoints didn't change. Then I also need to make a lot of controller forwards to the legacy controller. Or am I missing something here.
Beta Was this translation helpful? Give feedback.
All reactions