You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: for support questions, please first reference our documentation, then use Stackoverflow. This repository's issues are intended for feature requests and bug reports.
I'm submitting a ...
🪲 bug report
What is the current behavior? If the current behavior is a 🪲bug🪲: Please provide the steps to reproduce
constapi: RestApi=/* ... */;api.node.defaultResouce;// Throws an exception
What is the expected behavior (or behavior of feature suggested)?
I expected api.node.defaultResource to return the CfnRestApi resource.
It turns out the RestApi construct registers the CfnRestApi as Resource and a virtual construct for the root resource (in the REST sense) as Default. This is surprising, as the CfnRestApi should be what is named Default, and the root REST resource should probably be called something like Root.
Please tell us about your environment:
CDK CLI Version: 0.37.0
Module Version: 0.37.0
OS: all
Language: all
The text was updated successfully, but these errors were encountered:
Call to api.node.defaultChild on the RestApi resource throws the exception Cannot determine default child for FirstStack/BooksApi. There is both a child with id "Resource" and id "Default"
Current calls to defaultChild would throw an exception since it
contains children named 'Resource' and 'Default'.
Explicitly setting the defaultChild value to the CfnRestApi construct.
fixes#3234
…4318)
* fix(apigateway): defaultChild on RestApi returns the underlying L1
Current calls to defaultChild would throw an exception since it
contains children named 'Resource' and 'Default'.
Explicitly setting the defaultChild value to the CfnRestApi construct.
fixes#3234
* Add tests and fixup documentation
* Add period
* PR feedback
Note: for support questions, please first reference our documentation, then use Stackoverflow. This repository's issues are intended for feature requests and bug reports.
I'm submitting a ...
What is the current behavior?
If the current behavior is a 🪲bug🪲: Please provide the steps to reproduce
I expected
api.node.defaultResource
to return theCfnRestApi
resource.It turns out the
RestApi
construct registers theCfnRestApi
asResource
and a virtual construct for the root resource (in the REST sense) asDefault
. This is surprising, as theCfnRestApi
should be what is namedDefault
, and the root REST resource should probably be called something likeRoot
.Please tell us about your environment:
The text was updated successfully, but these errors were encountered: