使用api平台管理同一路由的多个版本

问题描述 投票:1回答:1

我使用symfony和api平台来构建我的api。

我想管理同一路径的2个版本。例如 :path_url / v1 / myroutepath_url / v2 / myroute

是否可以使用api平台来做到这一点? (我想答案是肯定的,但我没有在文档中找到方法)

此外,如何管理2种版本的招摇。目前,我有一个版本的招摇工具:

enter image description here

如何查看不同版本并允许用户在V1和V2之间进行选择?

感谢您的建议。Dom

symfony api-platform.com
1个回答
0
投票

我在这里找到了。

在我的实体中,我添加了“ routePrefix批注”:

enter image description here

还有这里:

enter image description here

就像我现在大摇大摆一样:

enter image description here

不是我要找的东西,但我可以接受!

© www.soinside.com 2019 - 2024. All rights reserved.