[BUG] <title>@ApiDoc注解下的API在注册时无法把请求、返回body注册进去
Is there an existing issue for this?
- [x] I have searched the existing issues
Current Behavior
比如如图这个api,应该在document中得到OrderDTO、OrderDTO的结构信息,可是在页面上却是空的(如图)
Expected Behavior
No response
Steps To Reproduce
No response
Environment
ShenYu version(s):2.7.1-SNAPSHOT
Debug logs
No response
Anything else?
No response
Please assign it to me
Please assign it to me
你好,我好像没有权限管理issue,将issue分配给你。我应该向谁申请权限?
Please assign it to me
你好,我好像没有权限管理issue,将issue分配给你。我应该向谁申请权限?
社区的看到会指派的吧
你好,
我提的这个issue #5940 还请不要关哈。因为 和 #5946有些区别,5946是希望能得到返回类型,我的5940是希望得到返回类型以及输入参数类型 (request body type AND response body type)
@.***
发件人: xiaoyu 发送时间: 2025-03-05 13:48 收件人: apache/shenyu 抄送: AndersWantall; Author 主题: Re: [apache/shenyu] [BUG] @.注解下的API在注册时无法把请求、返回body注册进去 (Issue #5940) Closed #5940 as completed via #5946. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.>
Please assign it to me
你好,系统已分配给您,谢谢。
Please assign it to me
你好,系统已分配给您,谢谢。
https://github.com/apache/shenyu/blob/72c43ab02c0413a7566cab58470fe9e43f11abe9/shenyu-client/shenyu-client-core/src/main/java/org/apache/shenyu/client/core/utils/OpenApiUtils.java#L78C25-L87C26
参数目前是支持的, 只是只支持RequestParam和RequestPart注解, 所以文档findById能看到.
因为不像返回类型之前没有实现, 这是其他人的实现, 我吃不太准这个逻辑, 是否只要加上支持RequestBody注解就可以了. 因为这些注解是spring web的注解, 一些rpc不依赖于这个注解的吧.
@yu199195 https://github.com/apache/shenyu-dashboard/pull/521 This is the PR of the associated frontend, please review
Please assign it to me
你好,系统已分配给您,谢谢。
https://github.com/apache/shenyu/blob/72c43ab02c0413a7566cab58470fe9e43f11abe9/shenyu-client/shenyu-client-core/src/main/java/org/apache/shenyu/client/core/utils/OpenApiUtils.java#L78C25-L87C26
参数目前是支持的, 只是只支持
RequestParam和RequestPart注解, 所以文档findById能看到. 因为不像返回类型之前没有实现, 这是其他人的实现, 我吃不太准这个逻辑, 是否只要加上支持RequestBody注解就可以了. 因为这些注解是spring web的注解, 一些rpc不依赖于这个注解的吧.
我需要试试。在example工程里把@RequestBody和@ResponseBody加上看下效果。同时我看5946里面返回类型解析已经处理了,合到master分支了。我更新下试试看
本周末我可以试试,如果能够复现,我可以尝试修复
https://github.com/apache/shenyu/blob/72c43ab02c0413a7566cab58470fe9e43f11abe9/shenyu-client/shenyu-client-core/src/main/java/org/apache/shenyu/client/core/utils/OpenApiUtils.java#L78C25-L87C26