Closed radaiming closed 1 year ago
It works, thanks!
Generic parameters result in same struct, for example:
type Resp struct {
Code int `description:"code"`
Data any `description:"data"`
}
once if I initialize this struct with one specific type, each time would result in same struct.
@Dennis-Zhang-SH could you share some code to reproduce the issue?
Describe the bug If req/resp struct using generic, like
type req[T any] struct {}
, generated openapi output will contains schema with name likeReq[Blabla]
, and Swagger Editor complains it as semantic errorTo Reproduce Take the example code in README, I modify req/resp to use generic:
which will output:
Then paste it to https://editor.swagger.io/, it will complain
Component names can only contain the characters A-Z a-z 0-9 - . _
, although req/resp displayed correctlyExpected behavior Output schema name should not contain bracket
Additional context Nothing else and thanks for your library ❤️