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

JSII Go integration does not render structs with captials in CFN #4361

Open
codypenta opened this issue Nov 30, 2023 · 0 comments
Open

JSII Go integration does not render structs with captials in CFN #4361

codypenta opened this issue Nov 30, 2023 · 0 comments
Labels
bug This issue is a bug. p1

Comments

@codypenta
Copy link

Describe the bug

There are some fields in WAF that need to be rendered with a capital first letter instead of a normal one. For example:

awswafv2: SingleHeaderProperty fails deployment with:

Expected Behavior

synthesize a template with capitalized property
"FieldToMatch": { "SingleHeader": { "Name": "issued" }
Current Behavior

This is the generated template portion
"FieldToMatch": { "SingleHeader": { "name": "issued" } },

Expected Behavior

Expected behavior is resolution of a capital "Name" instead of a lowercase "name"

Current Behavior

A lowercase "name" is rendered

Reproduction Steps

see aws/aws-cdk#28074

Possible Solution

The actual Go code is here:

https://github.com/aws/aws-cdk-go/blob/main/awscdk/awswafv2/CfnLoggingConfiguration_SingleHeaderProperty.go#L29

It looks like the code that renders it is here:

https://github.com/codypenta/jsii/blob/c1fca2adca28be66caadfa5fa33523e30b8c5699/packages/jsii-pacmak/lib/targets/go/types/type-member.ts#L120

Additional Information/Context

Happy to submit a PR if y'all can point me in the right direction in how you would like to tackle this.

SDK version used

2.110.0

Environment details (OS name and version, etc.)

windows 10

@codypenta codypenta added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Nov 30, 2023
@mrgrain mrgrain added p1 and removed needs-triage This issue or PR still needs to be triaged. labels Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. p1
Projects
None yet
Development

No branches or pull requests

2 participants