Endpoint versioning made simple

Abstract

There are several ways of doing versioned endpoints. The speaker prefers solutions with the following characteristics:

  1. the version is part of the url
  2. consumers use one version number for all endpoints
  3. old versions should still work (backwards compatibility)
  4. adding a new version should be simple/fast
  5. 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.