Serverless-application-model: Error when validating template - property GatewayResponses not defined for resource of type AWS::Serverless::Api

Created on 28 May 2019  路  2Comments  路  Source: aws/serverless-application-model

When running sam validate on example template at https://github.com/awslabs/serverless-application-model/blob/master/examples/2016-10-31/api_gateway_responses/template.yaml

I get the following result:
Error: [InvalidResourceException('MyApi', 'property GatewayResponses not defined for resource of type AWS::Serverless::Api')] ('MyApi', 'property GatewayResponses not defined for resource of type AWS::Serverless::Api')

I would have expected this to validate.
Using aws-sam-cli v0.16.1
I'm not sure how this correlates to serverless-application-model which has latest 1.11.0?

Most helpful comment

SAM CLI hasn't merged the latest version of the translator yet. We have a PR to do this but there was an issue we first need to resolve.

All 2 comments

SAM CLI hasn't merged the latest version of the translator yet. We have a PR to do this but there was an issue we first need to resolve.

@danPudwellUK The latest SAM CLI release upgraded their dependency on the SAM translator. I just verified that I was able to successfully run sam validate against the given template using SAM CLI 0.21.0.

Was this page helpful?
0 / 5 - 0 ratings