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
Type Parameters support? #1104
Comments
Funny. Go1.18 is not released yet. |
"I'm experimenting". It will be released soon so I'm preparing for it :) |
Nice. I don't see what kinda Open API definition may swag generate for a "generic" definition. From my perspective, this kind of struct will be ignored by swag or will produce an error if it is used in a request/response. |
You can check my repository. By using generics, I'm trying to reduce code duplications for simple CRUD APIs, especially for admin panels. |
The error comes obviously from the fact you are using a swag binary that was built with a go version before 1.18 and the go/parser doesn't recognize generics. Regarding the project. if you are going to use DTO for request/response I believe it will work fine with current implementation. |
I've cloned the repository and changed the go version in the go.mod file and compiled it and then it worked as expected. Thank you. |
Hi, I'm experimenting with generics. I'm getting the following error.
The text was updated successfully, but these errors were encountered: