aws / aws-cdk

The AWS Cloud Development Kit is a framework for defining cloud infrastructure in code
https://aws.amazon.com/cdk
Apache License 2.0
11.52k stars 3.86k forks source link

docs: GitHub source link on API Documentation #31509

Open dontirun opened 2 hours ago

dontirun commented 2 hours ago

Describe the feature

Individual Each library (s3, ec2, lambda, etc) has a link to where that libraries code is defined in the aws-cdk GitHub Repo

Use Case

It make's it easier to troubleshoot/understand behavior of the construct and its properties. I often find myself manually searching the GitHub repo to do this and it can be tedious to do so.

Proposed Solution

No response

Other Information

No response

Acknowledgements

CDK version used

2.144.0 (build 5fb15bc)

Environment details (OS name and version, etc.)

mac os

pahud commented 2 hours ago

Have you tried class with className in the GitHub search box like if you need to check the ScalableTarget construct implementation but you're not sure which module it belongs to, simply type "class ScalableTarget" and hit enter in the GitHub search box. The first result would always be what you need:

image

then hit the link of the first result:

image

You will immediately get redirected to the first line of that class:

image

And this works for all classes in the whole repository on GitHub. Just a few seconds. For me, it's even easier than searching that in the API reference doc.

dontirun commented 2 hours ago

Nice, thank you! That makes searching a lot easier. While I still think a link to the source would be helpful, I think this a good "interim" solution

pahud commented 2 hours ago

I am leaving this feat request open and we welcome community to help us prioritize with 👍 . Thank you and we love sharing all the interesting tips like this.