-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
enhancementhelp wantedplannedThis issue/proposal is planned into our next steps.This issue/proposal is planned into our next steps.
Description
1. What version of Go
and system type/arch are you using?
go version go1.20.6 darwin/arm64
2. What version of GoFrame
are you using?
GoFrame CLI Tool v2.5.1, https://goframe.org
GoFrame Version: cannot find go.mod
CLI Installed At: /opt/homebrew/bin/gf
CLI Built Detail:
Go Version: go1.20.4
GF Version: v2.5.1
Git Commit: 2023-07-26 21:27:58 e0e00434cc87d6edf64fc3df40ce7d3f40758794
Build Time: 2023-07-26 21:32:56
3. Can this issue be re-produced with the latest release?
YES
4. What did you do?
按照gf gen ctrl 使用规范执行后,发现一直生成不了文件,后来发现是因为这样定义了api结构体:
type (
UserCreateReq struct {
g.Meta `path:"/User/Create" method:"post" summary:"UserCreateReq" tags:"User"`
Master *model.UserInput `json:"master"`
}
UserCreateRes struct {
Master *model.UserOutput `json:"master"`
}
)
如果改为如下定义方式,则可以生成文件:
type UserCreateReq struct {
g.Meta `path:"/User/Create" method:"post" summary:"UserCreateReq" tags:"User"`
Master *model.UserInput `json:"master"`
}
type UserCreateRes struct {
Master *model.UserOutput `json:"master"`
}
5. What did you expect to see?
希望能支持两种结构体定义方式
6. What did you see instead?
Metadata
Metadata
Assignees
Labels
enhancementhelp wantedplannedThis issue/proposal is planned into our next steps.This issue/proposal is planned into our next steps.