Skip to content

Commit

Permalink
feat(apigatewayv2-integrations): WebSocketMockIntegration props (#3…
Browse files Browse the repository at this point in the history
…0622)

### Issue # (if applicable)

None

### Reason for this change

Unlike the other integrations, `WebSocketMockIntegration` did not have a props interface, and was missing a few properties. This PR does not include integration responses, they are already being implemented in #29661 

### Description of changes

* Added `requestTemplates` and `templateSelectionExpression` to the newly created `WebSocketMockIntegrationProps`

### Description of how you validated changes

Unit and integration tests were updated

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
nmussy authored Jan 15, 2025
1 parent 3fbc785 commit a5a0168
Show file tree
Hide file tree
Showing 12 changed files with 381 additions and 65 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
"ApiId": {
"Ref": "mywsapi32E6CE11"
},
"RouteKey": "$default",
"AuthorizationType": "NONE",
"RouteKey": "$default",
"Target": {
"Fn::Join": [
"",
Expand All @@ -39,14 +39,18 @@
}
}
},
"mywsapisendmessageRouteSendMessageIntegrationD29E12F9": {
"mywsapisendmessageRouteDefaultIntegration702159AD": {
"Type": "AWS::ApiGatewayV2::Integration",
"Properties": {
"ApiId": {
"Ref": "mywsapi32E6CE11"
},
"IntegrationType": "MOCK",
"IntegrationUri": ""
"IntegrationUri": "",
"RequestTemplates": {
"application/json": "{\"statusCode\":200}"
},
"TemplateSelectionExpression": "\\$default"
}
},
"mywsapisendmessageRouteAE873328": {
Expand All @@ -55,29 +59,42 @@
"ApiId": {
"Ref": "mywsapi32E6CE11"
},
"RouteKey": "sendmessage",
"AuthorizationType": "NONE",
"RouteKey": "sendmessage",
"RouteResponseSelectionExpression": "$default",
"Target": {
"Fn::Join": [
"",
[
"integrations/",
{
"Ref": "mywsapisendmessageRouteSendMessageIntegrationD29E12F9"
"Ref": "mywsapisendmessageRouteDefaultIntegration702159AD"
}
]
]
}
}
},
"mywsapisendmessageRouteResponse2ED167D2": {
"Type": "AWS::ApiGatewayV2::RouteResponse",
"Properties": {
"ApiId": {
"Ref": "mywsapi32E6CE11"
},
"RouteId": {
"Ref": "mywsapisendmessageRouteAE873328"
},
"RouteResponseKey": "$default"
}
},
"mystage114C35EC": {
"Type": "AWS::ApiGatewayV2::Stage",
"Properties": {
"ApiId": {
"Ref": "mywsapi32E6CE11"
},
"StageName": "dev",
"AutoDeploy": true
"AutoDeploy": true,
"StageName": "dev"
}
}
},
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a5a0168

Please sign in to comment.