Skip to content

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

@danPudwellUK

Description

@danPudwellUK

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?

Also when running sam build I get the following error:

  File "/usr/local/lib/python3.7/site-packages/samcli/lib/samlib/wrapper.py", line 67, in run_plugins 
    parser.parse(template_copy, all_plugins)  # parse() will run all configured plugins 
  File "/usr/local/lib/python3.7/site-packages/samcli/lib/samlib/wrapper.py", line 134, in parse 
    raise InvalidDocumentException(document_errors) 
samtranslator.model.exceptions.InvalidDocumentException: [InvalidResourceException('AdaptApiGateway', 'property GatewayResponses not defined for resource of type AWS::Serverless::Api')] ```

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions