full-stack-fastapi-template icon indicating copy to clipboard operation
full-stack-fastapi-template copied to clipboard

Multiple versions architecture

Open adammrozik opened this issue 4 years ago • 1 comments

Hey, I have a general architecture question.

I see in your example that you hide all endpoints behind app_v1 folder. If several of them would be reused in v2, v3 etc., would you just copy paste them?

Second question is about other dependencies inside the package. What if there is some common code that is only used by v1? Do I just keep increasing common functionalities to enable all versions, or do I just hide the version specific code inside each of the version folders?

adammrozik avatar Jun 12 '21 09:06 adammrozik

Changing api version is not something you would need to do often. To keep things simple I suggest to just use v1 version of api until you will have reason to have v2 which won't be backward compatible. (If v2 will be backward compatible, then maybe you don't need v2).

karolzlot avatar Aug 03 '21 23:08 karolzlot