Skip to content
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 Fields does not handle Arrays (Type definition of type '*ast.IndexExpr' is not supported yet) #1306

Closed
johan-lejdung opened this issue Aug 25, 2022 · 2 comments

Comments

@johan-lejdung
Copy link

johan-lejdung commented Aug 25, 2022

Describe the bug
Generic fields with Arrays still not supported even after #1305.

To Reproduce
Have a look at the following repo https://github.com/chaintraced/swaggo-issue-repo
On the main branch's latest commit you will see that it is not working as intended.

It's outputting

Type definition of type '*ast.IndexExpr' is not supported yet. Using 'object' instead.

Expected behaviour
I expect the generic field to be properly read and generated

Your swag version
I forked the repo to be able to release a version including the latest generic code changes https://github.com/chaintraced/swag

Your go version
e.g. 1.18.0

@johan-lejdung johan-lejdung changed the title Generic Fields does not handle Arrays Generic Fields does not handle Arrays (Type definition of type '*ast.IndexExpr' is not supported yet) Aug 25, 2022
@johan-lejdung
Copy link
Author

@FabianMartin I immediately found another case that is not supported 😅

This time I've built the testing repo to hopefully cover some other potential error cases as well, please let me know how I can help further 🙏

FabianMartin added a commit to FabianMartin/swag that referenced this issue Aug 27, 2022
- Support for *ast.IndexExpr added
- tests extended to cover use cases

fixes swaggo#1306
@FabianMartin
Copy link
Contributor

Hi @johan-lejdung

Thank you for your tests and your testing repo. This helps a lot to find all potential cases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants