Are there any best practices for the implementation of API versioning? I'm interested in the following points:
- Controller, service - e.g. do we use a different controller class for each version of the API? Does a newer controller class inherit the older controller?
- Model - if the API versions carry different versions of the same model - how do we handle conversions? E.g. if v1 of the API uses v1 of the model, and v2 of the API uses v2 of the model, and we want to support both (for backward-compatibility) - how do we do the conversions?
- Are there existing frameworks/libraries can I use for these purposes in Java and JavaScript?
Thanks!