2
I am creating Rest services with Java (Jersey).
This service tends to grow and evolve, and may undergo changes in existing routines, therefore, I believe that the best way would be to create versions in production so that clients do not break with changes.
Currently I deploy the system in Tomcat, access through an example URL:
http://www.meudominio.com.br:8180/minhaApi/recurso
I believe the ideal would be something like:
http://www.meudominio.com.br:8180/minhaApi/v1/recurso
http://www.meudominio.com.br:8180/minhaApi/v2/recurso
How to do this?
Aren’t you putting the cart before the horse? If you haven’t even launched the first version yet, why worry about the second?
– Jéf Bueno
Because a second phase is already planned and I know how things happen. A "simple" change request will arrive in a resource that is already in production.
– NilsonUehara
There I think which is a small misconception of yours. Are you sure this "simple request to change a resource" will have to be released in a different (major) version? Of course it’s up to you when your API version changes, but I think.
– Jéf Bueno
My fear is (assumption mode on): I will have a mobile app running on n users. Suddenly I need to modify something in a feature that will break the use in these customers. I didn’t want to have to change, upload the new app to the store and force all users to update. If I have this control I do not need to force anything, because everyone will continue accessing the previous version, got?
– NilsonUehara