-
Notifications
You must be signed in to change notification settings - Fork 150
RestApiId not set #9
Comments
@thomasmichaelwallace Can you give more information about your configuration? Because normally the cloud formation stack should be established before the after deploy hook. But maybe it would be good to wait for completion first. Because your fix rather looks like a workaround. I can't imagine the API ID not being there in general. I will have a look into this the next days (after Christmas). |
Sure, It's quite possible I'm doing something wrong, however this turns out what I want- a lambda backed API Gateway call with a human readable url ([email protected]:):
I take what you mean about it being more of a workaround. From what I saw the cloud formation stack has been established by the time this code runs. It's just that the stacks don't include any with the key 'ApiId'. They include:
Maybe it's more reliable to query the resources, which include ApiGatewayRestApi? It might also be worth noting that I was adding documentation to an API that had previously been created (e.g. it was a stack update, not a stack create); but surely this needs to be able to update docs on existing stacks too? |
@thomasmichaelwallace I guess I found the problem that caused that bug. I tested this with the serverless.yml that you were providing and it worked when I added the key. |
Fixed the bug in #11. @thomasmichaelwallace: Can you have a look it this solves your problem? EDIT: |
Cheers @tchock that fixed it. |
I'm not sure if it's my configuration, but this plugin can't detect my RestApiId and therefore fails to update/create the documentation.
I've found a fix, which involves adding an alternative to assuming the the Cloud Formation stack has
ApiId
, as it can also be taken from theServiceEndpoint
.I'll make a PR for discussion.
The text was updated successfully, but these errors were encountered: