如何让openapi平台路径参数出现在界面中 [英] how to make openapi platform path parameters appear in interface

查看:24
本文介绍了如何让openapi平台路径参数出现在界面中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法在像

/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"
 *                     }
 *                 }
 *             }
 *         }

我已经创建了我的自定义控制器,但路径参数没有出现在 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆