Answer the question
In order to leave comments, you need to log in
How to support multiple API versions?
Hello! I have a website and an API for the application.
The site is written in PHP with the MVC pattern, so the API uses part of the functionality (model) for its own needs.
those. for example, the authorization model is great for both the site and the application API / As a result, it turned out that, in fact, the site has its own controller, and API version 1 is a different controller.
All API files are in a separate folder.
The problem is this... If another version of the API is needed, it turns out that I need to make a duplicate of the API directory on the server and, roughly speaking, add the number 2 to it and redo it?
But here Another question, it turns out, when changing site models, you need to constantly monitor that these changes do not affect any of, say, a dozen API versions? Somehow it doesn’t converge (( Tell me with advice where I didn’t turn there ....
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question