quite often there are tips for developing API URLs, where the URLs are in the format "/ api / v1 / resource", and then when the API changes, we can change to / api / v 2, etc.
Now this should be somehow implemented. There are several options:
- deploy the project to the root of the web server and let the routing rules take care of working with the / api / v 1 part
- project deployment in / api / subfolder (virtual directory), routing rules take care of parts / v 1, / v2, etc., but do not know about / api / part of URLs.
- deployment of the project in the subfolder / api / v 1 (virtual directory). The new version of the API is a new project that is being deployed separately. The project is strictly related to resources as the root concept, but, as a rule, does not know about the / api / vX part.
So which method would you choose and why?
Regards, DANIEL
source share