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

Stack Failure in 'Method response status' with inline swagger definition #94

Closed
AlexOugh opened this issue Feb 18, 2017 · 8 comments
Closed

Comments

@AlexOugh
Copy link

Using the inline swagger definition,
it failed with below message when the swagger definition has 'Method response status' like 200.

An error occurred (ValidationError) when calling the CreateChangeSet operation: Template format error: [/Resources/ApiGatewayApi/Properties/DefinitionBody/paths//XXXX/delete/responses] map keys must be strings; received numeric [200] instead

@sanathkr
Copy link
Contributor

Can you share the SAM template you are using?

@AlexOugh
Copy link
Author

I added '.docx' because github doesn't allow the files with yaml extension, so please remove '.docx' after downloading.

template.yaml.docx

@AlexanderKulka
Copy link

I was specifying responses as a numeric type and when I got this issue. Trying wrapping the response code in quotations.

              responses:
                '200':
                  description: 200 response

@AlexOugh
Copy link
Author

I thought I tried that before, but I didn't seem to have.
It works good, but it still fails with another error. (FYI, I added 'Empty' definition in the API 'DefinitionBody', which was another error).

Errors found during import: Unable to put integration on 'GET' for resource at path '/cloudtrail': AWS ARN for integration must contain path or action Unable to put integration on 'POST' for resource at path '/cloudtrail': AWS ARN for integration must contain path or action Unable to put integration on 'DELETE' for resource at path '/cloudtrail': AWS ARN for integration must contain path or action

Can you explain what this error mean?

@sanathkr
Copy link
Contributor

sanathkr commented Apr 5, 2017

Could this be related to #91?

@sanathkr sanathkr added the bug label Apr 5, 2017
@sanathkr
Copy link
Contributor

This definitely looks like #91. I will close this one and use the other issue to track the bug

@badfun
Copy link

badfun commented Sep 27, 2017

This is not the same issue as #91. In the documentation and the examples responses are shown not wrapped in quotes. I got this error as well and was able to resolve it by adding the quotes. Issue #91 refers to quotes being stripped away.

@MikhailKavaliou
Copy link

I've just run into the similar issue:
Template validation error: Template format error: [/Resources/xxx/get/responses] map keys must be strings; received numeric [200] instead

The swagger template has been generated with the API Gateway export tool in YAML format. Wrapping the 200 response code with double quotes in the generated swagger description has solved the issue.

mndeveci pushed a commit that referenced this issue Nov 19, 2021
hawflau added a commit that referenced this issue Apr 6, 2022
* feat: Support for Lambda URL (#86)

* feat: changed CorsConfig property to Cors (#89)

* feat: add list of "unreleased" properties (#91)

This change hides the unreleased properties from the "Globals" error message

* Lambda URL integ test (#94)

* remove functionUrlConfig from the unrelease properties (#97)

* remove functionUrlConfig from the unrelease properties

* updates

* Function Url new changes  (#109)

* update to Function Url

* first update

* reverted to support autopublishing and added validation for AuthType values

* adding Integration test

* fix: fix paths IF intrinsic bug (#107)

* fix: fix paths IF intrinsic bug

* missed bit of code

* add NoValue tests

* review feedback and refactoring

* naming fix

* review feedback naming and comments

* add missing test + add extra check for api key on tests

* integration test updated (#122)

Co-authored-by: jonife <79116465+jonife@users.noreply.github.com>
Co-authored-by: Renato Valenzuela <37676028+valerena@users.noreply.github.com>
Co-authored-by: Ruperto Torres <86501267+torresxb1@users.noreply.github.com>
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

No branches or pull requests

5 participants