A
A
Anton Ivanov2017-03-26 10:47:49
API
Anton Ivanov, 2017-03-26 10:47:49

How to properly version API?

Hello!
A question. I have an API. It doesn’t really matter what, for example, on the rails.
If I make a new version of api, in which some of the methods remain the same, and some have changed, which approach would be more correct?
a) I create a new controller with only new methods, if there is no method in the current version, it will be searched for in similar controllers of previous versions
b) I create a new controller that will contain all the methods, even those that have not changed.
It seems to me that approach b) is more correct, since in this case there will be no headache with stopping support for older versions, you can simply remove the controller(s) and that's it
. But I want to make sure, having learned the opinion of the public :)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question