gf
gf copied to clipboard
Post请求,Req结构字段定义`in:header`,仍会出现在body中,导致swagger或redoc出现两个相同字段
1. What version of Go
and system type/arch are you using?
go 1.17, mac
2. What version of GoFrame
are you using?
v2.1.0-rc4
3. Can this issue be re-produced with the latest release?
yes
4. What did you do?
define
type GetUserReq struct {
g.Meta `path:"/user" tags:"User" method:"post" sm:"获取用户信息"`
Token string `json:"token" v:"required" dc:"用户token" in:"header"`
UserId int `json:"user_id" v:"required" dc:"用户ID"`
}
type GetUserRes struct{}
open /swagger

open /api.json

5. What did you expect to see?
header param not in request body
6. What did you see instead?
header param in request body
建议升级版本使用