awslabs / awslabs/aws-solutions-constructs
aws-apigateway-dynamodb enable passing of methodOptions for use in addProxyMethodToApiResource
- Dominant language
- TypeScript
- Stars
- 1.4k
- Forks
- 268
- Avg merge
- 5h 18m
- Merged PRs (30d)
- 5
Description
The addProxyMethodToApiResource accepts a params.methodOptions to be able to override/complement the default options defined
https://github.com/awslabs/aws-solutions-constructs/blob/dc48e482f936c856398c7e600a7805a99a3bea44/source/patterns/%40aws-solutions-constructs/core/lib/apigateway-helper.ts#L324
unfortunately the aws-apigateway-dynamodb construct does not pass this in its call the the addProxyMethodToApiResource method e.g
https://github.com/awslabs/aws-solutions-constructs/blob/dc48e482f936c856398c7e600a7805a99a3bea44/source/patterns/%40aws-solutions-constructs/aws-apigateway-dynamodb/lib/index.ts#L265
### Use Case
Overriding default headers to specify CORS values would be a great use case to do it whilst overriding the default method responses.
### Proposed Solution
Be able to pass in methodOptions as aditional opitional attribute . e.g : createIntegrationMethodOptions
* [ ] :wave: I may be able to implement this feature request
* [ ] :warning: This feature might incur a breaking change
---
This is a :rocket: Feature Request
Contributor guide
Research direction
Start in source/patterns/@aws-solutions-constructs/aws-apigateway-dynamodb/lib/index.ts at the addProxyMethodToApiResource call, then inspect the methodOptions parameter in source/patterns/@aws-solutions-constructs/core/lib/apigateway-helper.ts. Confirm how an optional methodOptions value should be exposed and forwarded. Done means callers can override or extend the default method options, including CORS-related values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- api, database
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100