Correct way to implement API versioning with active_model_serializers

前端 未结 2 631
执笔经年
执笔经年 2020-12-29 16:01

I know there are already some questions and also this is a open issue regarding AMS not handling namespaces too efficiently (which is used by this versioning approach) but I

2条回答
  •  长情又很酷
    2020-12-29 16:34

    Since I haven't found a better way, neither documented nor anywhere, it also seems to be correct and I haven't faced problems after a while using it, this appear to be a good approach for API versioning.

    Anyway, I advise caution using this approach to not change behaviour of older supported versions for your API. Test carefully and notify your clients for deprecations and support removal for old versions.

提交回复
热议问题