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

Add payloadFormatVersion to API Gateway Integration trait. #527

Merged
merged 3 commits into from
Aug 14, 2020

Conversation

JuergenO
Copy link
Contributor

Currently, when converting the Smithy model to API Gateway for HTTP APIs, it fails because it doesn't configure the payloadFormatVersion. This change adds the payload format version to the IntegrationTrait.

The payload format version specifies the format of the data that API Gateway sends to an integration, and how API Gateway interprets the response. If you create an integration for HTTP APIs programmatically, you must specify a payloadFormatVersion. The supported values are 1.0 and 2.0.

Issue #, if available: No issue #

Description of changes: See commit message above. Added the payloadFormatVersion that is required as document here: https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html

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

Currently, when converting the Smithy model to API Gateway for HTTP APIs, it fails because it doesn't configure the `payloadFormatVersion`. This change adds the payload format version to the IntegrationTrait.

The payload format version specifies the format of the data that API Gateway sends to an integration, and how API Gateway interprets the response. If you create an integration for HTTP APIs programmatically, you **must** specify a payloadFormatVersion. The supported values are 1.0 and 2.0.
Copy link
Member

@mtdowling mtdowling left a comment

Choose a reason for hiding this comment

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

@JuergenO
Copy link
Contributor Author

Can you add this new property to the trait definition too? https://github.com/awslabs/smithy/blob/master/smithy-aws-apigateway-traits/src/main/resources/META-INF/smithy/aws.apigateway.json#L124

Sorry, forgot about that one. Added it to the trait definition now + modified the documentation.
Please let me know if there's anything else I missed.

Thanks

@srchase srchase merged commit 511c0da into smithy-lang:master Aug 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants