jzero-io / goctl-types

goctl 生成的 types go 文件按照 group name 分组插件
MIT License
2 stars 0 forks source link

【need help】handler 返回的 types 为 arrayType 并且 arrayType 中嵌入 type 时, 将其放入了 types.go 不符合预期 #1

Open jaronnie opened 4 months ago

jaronnie commented 4 months ago

api 文件如下:

syntax = "v1"

type BaseTree {
    id int `json:"id"`
}

type Tree {
    base BaseTree `json:"base"`
}

@server (
    prefix: /api/v1
    group: test
)
service demo-api {
    @handler Tree
    get /test/tree () returns ([]Tree)
}

期望 BaseTree 结构体也在 test.types.go 中

jaronnie commented 4 months ago

fix