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
Extended generics support #1277
Conversation
nested generics support and related tests added
cache generic definitions by full name
- allow usage of arrays as parameter definitions - tests extended and new body param added to tests
- get generic field type - support built in types in structs refs swaggo#1213
add prefix to generic model names, to prevent renaming, if name annotation exists
bf89c11
to
9c54413
Compare
Codecov Report
@@ Coverage Diff @@
## master #1277 +/- ##
==========================================
+ Coverage 94.84% 94.95% +0.11%
==========================================
Files 14 14
Lines 2620 2717 +97
==========================================
+ Hits 2485 2580 +95
- Misses 74 78 +4
+ Partials 61 59 -2
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job so far. Please update according to the comments.
- 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
Suggested changes applied
Hi @ubogdan, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@FabianMartin Thanks for your contribution. |
Fantastic, much appreciated @FabianMartin ! Looking forward to this getting released so that I can try it with my generic structs that's currently not being picked up correctly With any luck this might also solve #1253 |
@johan-lejdung Thank you for your feedback. A fix for your issue is included in PR #1281. |
Describe the PR
Extends the generic support for go 1.8
Relation issue
#1170
#1213
Additional context
All changes are backward compatible and have been tested with Go 1.15, 1.16, 1.17 and 1.18.4. It is possible that other issues, besides the ones mentioned, have been fixed.