JSII Go integration does not render structs with captials in CFN
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 267
- Avg merge
- 1d 25m
- Merged PRs (30d)
- 14
Description
### 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 https://github.com/aws/aws-cdk/issues/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
Contributor guide
Research direction
Start by reading packages/jsii-pacmak/lib/targets/go/types/type-member.ts around line 120 and compare its output with the generated aws-cdk-go SingleHeaderProperty file linked in the issue. Reproduce the WAF SingleHeaderProperty case, then verify that the synthesized template uses "Name" rather than "name".
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, go, typescript
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100