I
I
Igor2020-05-04 20:18:02
git
Igor, 2020-05-04 20:18:02

API versioning in a GIT system?

Colleagues, welcome.

It's not the first day I've been thinking about the concept of API versioning, with backward compatibility.

This task can be solved in different ways, from the banal creation of a v2 route to more complex logic in the context of a single application.

I don't want to create additional controllers.
Conditionals ControllerV1, ControllerV2

There is an idea to farm out the GIT system.

Conditional branch V1, and if V2 is required, then we make a branch and launch a new application.
The fact is that the entire project, from the word, is completely dockerized and, in principle, there are no problems with rapid deployment.

As a result, no additional routes need to be created.
API versions are isolated from each other.
Deployment with one finger.

Is there sobriety in reasoning?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Shumov, 2020-05-04
@IgorPI

So, here are some good practices:
- versioning by url - deployment of different api instances by different http prefixes
- old versions of the API only for support, without development. Can be separated into a separate branch in git
- containers must have the same versioning

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question