Add `OpenApiVersion` to globals in SAM template to prevent additional API Gateway stage from being created
- Dominant language
- Python
- Stars
- 11.1k
- Forks
- 1k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 2
Description
By default, AWS SAM [will create an API Gateway stage named `Stage`](https://github.com/aws/serverless-application-model/issues/191), but the SAM team has [released a workaround](https://github.com/aws/serverless-application-model/issues/191#issuecomment-515589603) that requires adding an `OpenApiVersion` flag to the template, like this:
https://github.com/aws/serverless-application-model/blob/6da6a5b96fb1598d36ee89b397204389a7f65263/tests/translator/input/api_with_open_api_version.yaml#L3
Since I'm using Chalice with CDK, I can't use the [included CloudFormation support](https://aws.github.io/chalice/topics/cfn.html) to merge this flag into the generated template, and I think this should be a default for Chalice anyway. Is there a way this flag could be added?
Contributor guide
Research direction
Start with the SAM example at tests/translator/input/api_with_open_api_version.yaml#L3 and review Chalice's CloudFormation support documentation. Trace where Chalice generates the SAM template and determine whether the global OpenApiVersion setting can be added by default. Done means the generated template contains the flag and prevents the extra API Gateway Stage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, python
- Domain
- api, cloud
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100