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

ApiGateway GetRestApis returns empty maps when there's only one api #45

Closed
maxthoursie opened this issue Jan 21, 2019 · 3 comments
Closed
Labels
bug Something isn't working

Comments

@maxthoursie
Copy link

Following up on #35, when I removed the api definition I made for testing, leaving only one api defined, the call to GetRestApis stopped working.

With two apis defined:

(aws/invoke apigw {:op :GetRestApis})
=>
{:items [{:endpointConfiguration {:types [\R \E \G \I \O \N \A \L]},
          :name "test",
          :apiKeySource "HEADER",
          :id "<removed>",
          :createdDate #inst"2019-01-21T17:16:52.000-00:00"}
         {:endpointConfiguration {:types [\R \E \G \I \O \N \A \L]},
          :name "<removed>",
          :apiKeySource "HEADER",
          :binaryMediaTypes [\* \/ \*],
          :id "<removed>",
          :createdDate #inst"2018-12-21T12:19:45.000-00:00",
          :version "2019-01-17T15:45:00Z"}]}

With only one:

(aws/invoke apigw {:op :GetRestApis})
=>
{:items [{} {} {} {} {} {} {}]}

The api is in the request body, but it's not wrapped in a vector as it is when there are more than one api's defined.

@dchelimsky dchelimsky added the bug Something isn't working label Jan 22, 2019
@dchelimsky dchelimsky added this to To do in AWS API Project Jan 22, 2019
@dchelimsky
Copy link
Contributor

Fixed on master. The change also fixes the types list, so you should get this now:

{:items [{:endpointConfiguration {:types ["REGIONAL"]},
          :name "<removed>",
          :apiKeySource "HEADER",
          :binaryMediaTypes [\* \/ \*],
          :id "<removed>",
          :createdDate #inst"2018-12-21T12:19:45.000-00:00",
          :version "2019-01-17T15:45:00Z"}]}

@dchelimsky dchelimsky moved this from To do to Ready to release in AWS API Project Jan 24, 2019
@dchelimsky dchelimsky moved this from Ready to release to Released in AWS API Project Jan 26, 2019
@maxthoursie
Copy link
Author

I can confirm it works! 👍

@dchelimsky
Copy link
Contributor

Thanks for the feedback. It's part of 0.8.223, which was released on Friday.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants