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

CORS Error despite thoroughly reading CDK docs, CDK docs error in the public reference #3448

Closed
4 tasks
wendysophie opened this issue Mar 29, 2022 · 2 comments · Fixed by #3449
Closed
4 tasks
Labels
bug This issue is a bug. p1

Comments

@wendysophie
Copy link

🐛 Bug Report

Affected Languages

  • TypeScript or Javascript
  • [ X] Python
  • Java
  • .NET (C#, F#, ...)
  • Go

General Information

  • JSII Version:
  • Platform:

What is the problem?

The documentation about the AWS CDK for python when specifying the integration response, and method response wrongly put an extra under score on the "_access-_control-_allow-_origin", instead, the correct naming should be "Access-Control-Allow-Origin" which caused the customer's application not working even after throughly read the CDK docs.

I have attached the screen cap that customer shared with the ticket. The extra underscore could affect other parameter as well across the documentation.

Verbose Log

[<!--]

  • If your issue is with jsii: please provide the output of running jsii with
    the --verbose option.
  • If your issue is with jsii-pacmak: please provide the output of running
    jsii-pacmak with the --verbose option.
  • If your issue is when running generated code: please provide the output of
    running your program with the JSII_DEBUG=1 environment variable being set.

If the output is very large, you may store it in a gist. In any case,
please review the contents of the log you are about to submit and edit any
confidential information out.

-->

@wendysophie wendysophie added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Mar 29, 2022
RomainMuller added a commit that referenced this issue Mar 29, 2022
The Python transliterator failed to properly account for maps when
transliterating keys, resulting in name-mangling being applied on these
when it should not have been.

This PR adds a new `inMap` context entry to track whether a property
assignment must be interpreted as a map key-value entry, or an actual
keyword/value mapping; and in that case circumvents the mangling.

Added a new test to verify that such map literals render appropriately
using a key similar to that which caused #3448.

Fixes #3448
@RomainMuller
Copy link
Contributor

Hey! Thanks for reporting this!

There is indeed a bug in the Python transliteration suite which will cause it to incorrectly translate map keys in this particular context. I've issued a PR with a fix.

@RomainMuller RomainMuller added p1 and removed needs-triage This issue or PR still needs to be triaged. labels Mar 29, 2022
@mergify mergify bot closed this as completed in #3449 Mar 29, 2022
mergify bot pushed a commit that referenced this issue Mar 29, 2022
The Python transliterator failed to properly account for maps when
transliterating keys, resulting in name-mangling being applied on these
when it should not have been.

This PR adds a new `inMap` context entry to track whether a property
assignment must be interpreted as a map key-value entry, or an actual
keyword/value mapping; and in that case circumvents the mangling.

Added a new test to verify that such map literals render appropriately
using a key similar to that which caused #3448.

Fixes #3448



---

By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license].

[Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
@github-actions
Copy link
Contributor

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

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

Successfully merging a pull request may close this issue.

2 participants