Replies: 3 comments 3 replies
-
https://midwayjs.org/docs/extensions/swagger#%E6%B3%9B%E5%9E%8B%E8%BF%94%E5%9B%9E%E6%95%B0%E6%8D%AE 这个? |
Beta Was this translation helpful? Give feedback.
1 reply
-
按我的想法,应该是这样 @ApiBody({
type: 'array',
items: {
type: GroupEndPoint
}
})
async setEndPoints() {} 前提是 GroupEndPoint 中有 @ApiProperty 定义 |
Beta Was this translation helpful? Give feedback.
2 replies
-
问题解决,非常感谢。 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the problem(描述问题)
使用 @midwayjs/swagger(版本 3.14.8),请教如何处理复杂参数和返回值的情况。
如下是一个接口定义:
目前swagger得到的如下,requestBody部分和responses部分都没有体现出详细结构,请问如何配置能够改善?
Midway Versions(Midway 版本)
"dependencies": {
"@midwayjs/bootstrap": "^3.12.0",
"@midwayjs/core": "^3.12.0",
"@midwayjs/decorator": "^3.12.0",
"@midwayjs/info": "^3.12.0",
"@midwayjs/koa": "^3.12.0",
"@midwayjs/logger": "^2.14.0",
"@midwayjs/swagger": "^3.12.7",
"@midwayjs/validate": "^3.12.0",
},
Beta Was this translation helpful? Give feedback.
All reactions