-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
generic type support #1655
Comments
Encountering the same problem |
using generic type like this, it works type Result[T any] struct {
Code int64 `json:"code"`
ErrorMsg string `json:"err_msg,omitempty"`
Data T `json:"data,omitempty" swaggerignore:"true"`
} // @response 200 {object} res.Result{data=xxx} |
oh~ I found now swag is support generic type, the using demo: |
Maybe we can just add a comprehensive example in the README/examples section? |
@ubogdan can we close this issue? |
it seems that swag version v1.16.3 occurs same generic error again, can't recognize type in [] |
+1 |
my golang project use generic type, when i use swag to init api docs, occur error: don't recognise "[]" in generic function or param
The text was updated successfully, but these errors were encountered: