You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
qinains
added
the
bug
It is confirmed a bug, but don't worry, we'll handle it.
label
Jun 26, 2024
qinains
changed the title
net/goai: issue The openAPI document api.json generated by gf has a problem with the properties={} parameter setting in each field.
net/goai: issue xxxReq没有必须的参数,requestBody不必必填
Jun 26, 2024
Go version
go version go1.22.0 windows/amd64
GoFrame version
2.7.1
Can this bug be reproduced with the latest release?
Option Yes
What did you do?
编辑:internal\cmd\cmd.go
api/v1/logout.go
What did you see happen?
生成的api.json文件为:
What did you expect to see?
如果xxxReq没有必须的参数,生成的api.json的requestBody的required是否应该为false?如下
P.S. 如果设置添加“mime:"application/x-www-form-urlencoded"”,就显示正常。(但是上面的例子,我又想让mime为application/json,可能以后添加其他参数)
type LogoutReq struct {
g.Meta
mime:"application/x-www-form-urlencoded" method:"post" path:"/logout" summary:"用户退出登录" tags:"auth"
TokenReq
}
The text was updated successfully, but these errors were encountered: