Skip to content

Commit

Permalink
update integ
Browse files Browse the repository at this point in the history
  • Loading branch information
badmintoncryer committed Sep 10, 2024
1 parent 1462826 commit eb1f1be
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ import * as apigw from 'aws-cdk-lib/aws-apigatewayv2';
const app = new cdk.App();
const stack = new cdk.Stack(app, 'aws-cdk-aws-apigatewayv2');

new apigw.HttpApi(stack, 'HttpApi');
new apigw.HttpApi(stack, 'HttpApi', {
routeSelectionExpression: true,
});

new IntegTest(app, 'http-api', {
testCases: [stack],
Expand Down
2 changes: 1 addition & 1 deletion packages/aws-cdk-lib/aws-apigatewayv2/lib/http/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ export class HttpApi extends HttpApiBase {
corsConfiguration,
description: props?.description,
disableExecuteApiEndpoint: this.disableExecuteApiEndpoint,
routeSelectionExpression: props?.isDefaultRouteSelectionExpression === true ? '$request.method $request.path' : undefined,
routeSelectionExpression: props?.routeSelectionExpression === true ? '$request.method $request.path' : undefined,
};

const resource = new CfnApi(this, 'Resource', apiProps);
Expand Down

0 comments on commit eb1f1be

Please sign in to comment.