-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
fix(aws, apigateway): make StatusCode property compliant with AWS-documented types #7977
fix(aws, apigateway): make StatusCode property compliant with AWS-documented types #7977
Conversation
…umented types for AWS::ApiGateway::Method objects
Codecov Report
@@ Coverage Diff @@
## master #7977 +/- ##
=======================================
Coverage 88.13% 88.13%
=======================================
Files 242 242
Lines 9146 9146
=======================================
Hits 8061 8061
Misses 1085 1085
Continue to review full report at Codecov.
|
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 @Undre4m ! Please check my suggestion
@@ -159,7 +159,7 @@ module.exports = { | |||
); | |||
|
|||
const integrationResponse = { | |||
StatusCode: parseInt(statusCode, 10), | |||
StatusCode: parseInt(statusCode, 10).toString(), |
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.
Let's just put statusCode
(note that in original code string is converted to number, instead of reconverting obtained number to string, let's just not convert to number)
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.
Right! Missed that 👍
@@ -36,7 +36,7 @@ module.exports = { | |||
const methodResponse = { | |||
ResponseParameters: {}, | |||
ResponseModels: {}, | |||
StatusCode: parseInt(statusCode, 10), | |||
StatusCode: parseInt(statusCode, 10).toString(), |
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.
Same here
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 @Undre4m !
For
AWS::ApiGateway::Method
resources, make MethodResponse and IntegrationResponseStatusCode
property type-compliant with AWS-documented types to avoid validation errors on compiled CloudFormation templates.Closes: #7970