Endpoint versioning made simple
src: Endpoint versioning made simple by Bouke Nijhuis - 2024-10-09
Abstract
There are several ways of doing versioned endpoints. The speaker prefers solutions with the following characteristics:
- the version is part of the url
- consumers use one version number for all endpoints
- old versions should still work (backwards compatibility)
- adding a new version should be simple/fast
- and require a minimal amount of extra code
The reason for the second characteristic is as follows: the consumer does not have to keep track of different version for every endpoint. The solution should be as simple as possible for the consumer.
This GitHub - BoukeNijhuis/dynamic-version-url library enables you to use versioned endpoints with the mentioned characteristics in Spring Boot. This is done by slightly modified annotations.