Configuring a versioning scheme
Let's imagine we have to serve the following two versions of our RESTful Web Service:
- Version 1: The version we have developed so far. However, we want to make sure that the clients understand that they are working with version 1, and therefore, we want to include a reference to the version number in the URL for each HTTP request.
- Version 2: This version has to allow clients to reference the drones resource collection with the
vehicles
name instead ofdrones
. In addition, the drone categories resource collection must be accessed with thevehicle-categories
name instead ofdrone-categories
. We also want to make sure that the clients understand that they are working with version 2, and therefore, we want to include a reference to the version number in the URL for each HTTP request.
The difference between the second and the first version will be minimal because we want to keep the example simple. In this case, we will take advantage of the previously explained NamespaceVersioning...