-
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
go generics cannot parse #1213
Comments
create a project directly using the following code:
Then use |
Unfortunately, we don't have support for Generics now. |
when will generics be supported |
As you may know, swag is an Open Source project. Most of its code comes from community contributions. It's hard to say when I hope we will bring that functionality asap. |
I also have Parsing issue on golang 1.18 based on the dep "golang.org/x/exp/constraints" yet I don't use generics in my project.
This appends on a command: |
- get generic field type - support built in types in structs refs swaggo#1213
* feat: add support for nested generics nested generics support and related tests added * fix: Multiple usage of same generic generate different definition paths cache generic definitions by full name * feat: add support for generic array parameter - allow usage of arrays as parameter definitions - tests extended and new body param added to tests * feat: Add support for generic properties - get generic field type - support built in types in structs refs #1213 * feat: Support custom model names for generics add prefix to generic model names, to prevent renaming, if name annotation exists * fix: Check if generic name starts with pkgName - The first underscore was replaced instead of checking if the generated name even starts with the package name. - New Tests added to test the name generation - schema test extended to test the new behavior * refactor: Apply suggested changes from PR
Describe the bug
An error occurred while parsing a data structure that contains generics.
This is my code:
and this is my comment:
Your swag version
e.g. 1.8.2
Your go version
1.18
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: