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
Fixes #3083: properly generate attributes with meta struct:pkg:path
#3084
Conversation
…pkg:path` What was the issue? What was meant to be a check on the parentPkg to avoid recursive definitions wasn't actually checking the parent package, but the package of the field itself. It was a bug that got introduced in goadesign#3022 and never worked as expected. Solution: Injecting the parent package for the initial definition seems to address this.
@raphael this fixes part of the issue in #3083 The
Instead of using the type from Any suggestions on how to address the second part? |
during marshaling/unmarshaling
Thank you for this, will take a look |
@raphael I have added a failing test to illustrate the remaining issue. I reckon the issue might be with |
* Upgrade to Go 1.18 * Use Go 1.18 in CI * sudo does not exist on Windows
The prior code didn't always take into consideration the case where a type has a required validation that does not apply (e.g. object with only primitive types that are not pointers). This refactor moves the logic to a common method that handles all corner cases.
…pkg:path` What was the issue? What was meant to be a check on the parentPkg to avoid recursive definitions wasn't actually checking the parent package, but the package of the field itself. It was a bug that got introduced in goadesign#3022 and never worked as expected. Solution: Injecting the parent package for the initial definition seems to address this.
When using "struct:pkg:path"
…z/goa into fix-struct-pkg-path
What was the issue?
What was meant to be a check on the parentPkg to avoid recursive
definitions wasn't actually checking the parent package, but the package
of the field itself.
It was a bug that got introduced in #3022 and never worked as expected.
Solution:
Injecting the parent package for the initial definition seems to address
this.