-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Open
Labels
@aws-cdk/aws-apigatewayRelated to Amazon API GatewayRelated to Amazon API Gatewayeffort/mediumMedium work item – several days of effortMedium work item – several days of effortfeature-requestA feature should be added or improved.A feature should be added or improved.good first issueRelated to contributions. See CONTRIBUTING.mdRelated to contributions. See CONTRIBUTING.mdp2
Description
Describe the feature
The SpecRestApi construct should accept as one of his construct props a binaryMediaTypes property that is the list of binary media mime-types that are supported by the resource.
This is already supported by the RestApi construct and by the underlying CloudFormation resource:
- https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.RestApi.html
- https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.SpecRestApi.html
- https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-apigateway-restapi.html
- https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-payload-encodings.html#api-gateway-payload-encodings-proxy
Use Case
When the API Gateway have to return binary data the mime-type has to be added in the API Gateway settings via the BinaryMediaTypes property.
Proposed Solution
Add the binaryMediaTypes to the SpecRestApi construct
Other Information
At the moment the alternative solution is to use escape hatches: https://docs.aws.amazon.com/cdk/v2/guide/cfn-layer.html
Acknowledgements
- I may be able to implement this feature request
- This feature might incur a breaking change
AWS CDK Library version (aws-cdk-lib)
2.213.0
AWS CDK CLI version
2.174.1
Environment details (OS name and version, etc.)
Linux
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-apigatewayRelated to Amazon API GatewayRelated to Amazon API Gatewayeffort/mediumMedium work item – several days of effortMedium work item – several days of effortfeature-requestA feature should be added or improved.A feature should be added or improved.good first issueRelated to contributions. See CONTRIBUTING.mdRelated to contributions. See CONTRIBUTING.mdp2