如何使openapi平台路径参数出现在界面中 [英] how to make openapi platform path parameters appear in interface
本文介绍了如何使openapi平台路径参数出现在界面中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我无法在类似这样的路由中创建包含路径参数的收集路由
I am not able to create a collection route containing path parameters in a route like
/api/myEntity/{var1}/{var2}
/api/myEntity/{var1}/{var2}
我在下面的实体中创建了注释
I created annotations in my entity like below
collectionOperations={
* "get"={
* "method"="GET",
* "path"="/smyEntity/{var1}/{var2}",
* "controller"=CustomController::class,
* "pagination_enabled"=false,
* "read"=false,
* "openapi_context"= {
* "parameters" = {
* {
* "name" = "var1",
* "in" = "path",
* "type" = "string",
* },
* {
* "name" = "var2",
* "in" = "path",
* "type" = "string"
* }
* }
* }
* }
我已经创建了自定义控制器,但是path参数没有出现在api管理界面中
I have create my custom controller but the paths parameters do not appear in api admin interface
推荐答案
这适用于v2.5.9,但不适用于2.6.0版本
this works for v2.5.9 but not since 2.6.0
我暂时会坚持使用2.5.9
i will stick to 2.5.9 for now
这篇关于如何使openapi平台路径参数出现在界面中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文