Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(apigateway): deployment fails when Model's contentType is not specified #6199

Merged
merged 1 commit into from
Feb 10, 2020

Conversation

nija-at
Copy link
Contributor

@nija-at nija-at commented Feb 10, 2020

CloudFormation and hence the CDK has marked this property as optional,
however, it is not. CloudFormation deployment will fail if this property
is not specified.

Use 'application/json' as the default as this is the most common case
when specifying the content type of the RestApi Model.

fixes #6161


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

…cified

CloudFormation and hence the CDK has marked this property as optional,
however, it is not. CloudFormation deployment will fail if this property
is not specified.

Use 'application/json' as the default as this is the most common case
when specifying the content type of the RestApi Model.

fixes #6161
@nija-at nija-at added the contribution/core This is a PR that came from AWS. label Feb 10, 2020
@nija-at nija-at self-assigned this Feb 10, 2020
@@ -167,7 +167,7 @@ export class Model extends Resource implements IModel {
const modelProps: CfnModelProps = {
name: this.physicalName,
restApiId: props.restApi.restApiId,
contentType: props.contentType,
contentType: props.contentType ?? 'application/json',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented Feb 10, 2020

Thank you for contributing! Your pull request is now being automatically merged.

@mergify mergify bot merged commit 0bf1403 into master Feb 10, 2020
@mergify mergify bot deleted the nija-at/apigateway-modelContentType branch February 10, 2020 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

API Gateway ModelOptions interface should require contentType
4 participants