Error when validating template - property GatewayResponses not defined for resource of type AWS::Serverless::Api
See original GitHub issueWhen 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')] ```
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (2 by maintainers)
Top Results From Across the Web
property GatewayResponses not defined for resource of type ...
Error when validating template - property GatewayResponses not defined for resource of type AWS::Serverless::Api #1198.
Read more >Api - AWS Serverless Application Model - AWS Documentation
An AWS::Serverless::Api resource need not be explicitly added to a AWS Serverless Application Definition template. A resource of this type is implicitly ...
Read more >Property StageName: not defined for resource of type AWS ...
Any ideas why StageName is not defined? Its clearly needed per AWS documentation. template.json { "AWSTemplateFormatVersion": "2010-09-09", ...
Read more >How to quickly build an API with Lambda, API Gateway, and ...
The SAM template language provides seven resource types. ... For example, I can define a Lambda function using an AWS::Serverless::Function ...
Read more >A Detailed Overview of AWS API Gateway - Alex DeBrie
Gateway response types; Key Takeaways from gateway responses ... You'll need to set the Request Validator property up top as well as specify ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This is going to be fixed with the next release, and other issues are open about the dependency upgrade. Closing this.
We’re actively working on the
aws-sam-translator
dependency, and by extension this issue.