-
Notifications
You must be signed in to change notification settings - Fork 190
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
Add support for empty shapes, used as booleans in SDK #536
Add support for empty shapes, used as booleans in SDK #536
Conversation
a9705b8
to
34e3d4b
Compare
@TiberiuGC this is great, i love it! Can you please provide an example generator.yaml in the PR description? |
34e3d4b
to
ec4cbc2
Compare
/retest |
c00c657
to
c3a897b
Compare
/retest |
2 similar comments
/retest |
/retest |
c3a897b
to
3050ec1
Compare
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.
Thank you @TiberiuGC , you rock!
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: a-hilaly, TiberiuGC The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
bdf3f26
into
aws-controllers-k8s:main
Issue #, if available: prerequisite for WAFv2 RuleGroup and WebACL CRDs
Description of changes:
Some WAFv2 API fields have empty json specs
{}
, e.g. https://docs.aws.amazon.com/waf/latest/APIReference/API_AllQueryArguments.htmlFor these type of fields, codegen currently errors out because it infers their gotypes as e.g.
AllQueryArguments *AllQueryArguments
but does not generate a
type AllQueryArguments struct
since the struct itself is empty, and not picked up bynewFieldRecurse
function.The solution proposed in this PR is to allow users to define
marker-shapes
, which instruct codegen to overwrite the type of these empty structs as[]byte
, both when generating the APIs and when setting up the SDK.e.g. generator.yaml for WAFv2, and inline:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.