-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
APIGW: fix OpenAPI import StatusCode string casting #12137
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
Conversation
"responseParameters": { | ||
"method.response.header.Access-Control-Allow-Origin": "'*'" | ||
}, | ||
"statusCode": "200", |
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.
before the fix, this would have been an int
and fail with some typed languages trying to decode the response
abf0057
to
9198503
Compare
9198503
to
24ef95f
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.
Thanks for improving the parity with this change, and yes types and yaml are not good friends!
24ef95f
to
6343abc
Compare
Motivation
We got a report that importing a specific OpenAPI file in API Gateway v1 would result in a type error in OpenTOFU:
This is because we were not casting as string the status code for the Method status code, and the IntegrationResponse.
When importing an API, we do so by creating the resources "in memory" directly and not via API calls, as this was how on the implementation was. This particular piece of code needs to be reworked fully, but this is out of scope of this PR.
Changes