Skip to content

Commit

Permalink
minor adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
Niranjan Jayakar committed Jul 6, 2020
1 parent 6844bb6 commit 5b5cf49
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions packages/@aws-cdk/aws-apigatewayv2/lib/http/api-mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ export class HttpApiMapping extends Resource implements IApiMapping {
apiId: props.api.httpApiId,
domainName: props.domainName.domainName,
stage: props.stage?.stageName ?? '$default',
// if apiMappingKey is '/' we set it as undefined which maps to the root path of the domain
apiMappingKey: props.apiMappingKey === '/' ? undefined : props.apiMappingKey,
apiMappingKey: props.apiMappingKey,
};

const resource = new CfnApiMapping(this, 'Resource', apiMappingProps);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@
"ApiId": {
"Ref": "HttpProxyProdApi368B6161"
},
"ApiMappingKey": "/",
"DomainName": "apigv2.demo.com",
"Stage": "$default"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as acm from '@aws-cdk/aws-certificatemanager';
import * as lambda from '@aws-cdk/aws-lambda';
import { App, CfnOutput, Stack } from '@aws-cdk/core';
import { DomainName, HttpApi, LambdaProxyIntegration } from '../../../lib';
import { DomainName, HttpApi, LambdaProxyIntegration } from '../../lib';

const app = new App();

Expand Down

0 comments on commit 5b5cf49

Please sign in to comment.