Skip to content

Commit

Permalink
Merge branch 'master' into addL2PatternProps
Browse files Browse the repository at this point in the history
  • Loading branch information
piradeepk authored Sep 26, 2019
2 parents 6f859a4 + b347c35 commit e290b22
Show file tree
Hide file tree
Showing 69 changed files with 17,539 additions and 1,419 deletions.
5,577 changes: 5,563 additions & 14 deletions packages/@aws-cdk/app-delivery/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/@aws-cdk/app-delivery/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"@aws-cdk/aws-s3": "^1.9.0",
"cdk-build-tools": "file:../../../tools/cdk-build-tools",
"cdk-integ-tools": "file:../../../tools/cdk-integ-tools",
"fast-check": "^1.16.2",
"fast-check": "^1.17.0",
"pkglint": "file:../../../tools/pkglint"
},
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-apigateway/lib/method.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export class Method extends Resource {
apiKeyRequired: options.apiKeyRequired || defaultMethodOptions.apiKeyRequired,
authorizationType: options.authorizationType || defaultMethodOptions.authorizationType || AuthorizationType.NONE,
authorizerId: authorizer && authorizer.authorizerId,
requestParameters: options.requestParameters,
requestParameters: options.requestParameters || defaultMethodOptions.requestParameters,
integration: this.renderIntegration(props.integration),
methodResponses: this.renderMethodResponses(options.methodResponses),
requestModels: this.renderRequestModels(options.requestModels),
Expand Down
33 changes: 32 additions & 1 deletion packages/@aws-cdk/aws-apigateway/test/test.method.ts
Original file line number Diff line number Diff line change
Expand Up @@ -578,5 +578,36 @@ export = {
}));

test.done();
}
},

'use default requestParameters'(test: Test) {
// GIVEN
const stack = new cdk.Stack();
const api = new apigateway.RestApi(stack, 'test-api', {
cloudWatchRole: false,
deploy: false,
defaultMethodOptions: {
requestParameters: {"method.request.path.proxy": true}
}
});

// WHEN
new apigateway.Method(stack, 'defaultRequestParameters', {
httpMethod: 'POST',
resource: api.root,
options: {
operationName: 'defaultRequestParameters'
}
});

// THEN
expect(stack).to(haveResource('AWS::ApiGateway::Method', {
OperationName: 'defaultRequestParameters',
RequestParameters: {
"method.request.path.proxy": true
}
}));

test.done();
},
};
Loading

0 comments on commit e290b22

Please sign in to comment.