4. Must take care
● Your API mustn't support too much versions
○ Messy code
○ A lot of branches
○ Bugs
○ Avoid more than 2 versions
● Accumulates contract breaks and release the new version
5. Must take care
● http://localhost:8080/v1/user/v2/address/v4/street
● http://localhost:8080/v1/user/v3/address/v3/street
○ Do not create a waterfall
6. How to versionate?
● URI Versioning – version the URI space using version indicators
● Versioning URI Parameters – version parameters
● Media Type Versioning – version the Representation of the Resource
7. URI Versioning
● Changes creates new uri (PathParam)
-> http: //localhost:8080/version1/users
-> http: //localhost:8080/version1/account
-----------------------------------------------
-> http://localhost:8080/version2/users
-> http: //localhost:8080/version2/account
9. Versioning URI Parameters
● Uses the new version as query parameter
-> http: //localhost:8080/users?version=1
-> http: //localhost:8080/account?version=1
-----------------------------------------------------------
-> http://localhost:8080/users?version=2
-> http: //localhost:8080/account?version=2
10. Versioning URI Parameters
● Pros
○ Don’t break hyperlinks used
○ Don’t change resource name or location
● Cons
○ Frameworks don’t support