API versioning is only useful if people have already integrated v1 of your API into their systems. If it's only for internal use, there shouldn't be any problems just changing the API to suit your needs as long as you update the systems using the API accordingly. If you do want to keep multiple versions, however, you should try to keep the codebase the same, but have different transformers for different versions of your API.
Api Versioning?
Q: when i create a new version, should I keep the current version files/controllers etc or just overwrite them to fit v2?
More info; Ok i have created v1 of my site, (the api is for internal people e.g. mobile devs to link the mobile app to api). and now we are working on v2.. I have already started working on it & changed the transformer/models etc to fit the v2 basically not caring about v1.. (its on a a new branch).. but now i realise maybe i should make it work with both v1/v2.. so as an exercise i cloned the v1 branch and moved all related files under V1/ (controllers, models, etc) and that worked perfectly.. obv its just a bit of a headache doing find/replace.. ).. but i am not sure if i should need to support both v1/v2 for INTERNAL people
Please or to participate in this conversation.