-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[WIP] API Docs #413
base: master
Are you sure you want to change the base?
[WIP] API Docs #413
Conversation
041317b
to
578ad1c
Compare
578ad1c
to
450bf75
Compare
b728d26
to
16b9e89
Compare
1dc65a2
to
ab45e47
Compare
0e5df0a
to
c7ae9c0
Compare
Any ETA on that? I'm coming from Sequelize which has full API reference, and I'm having a hard time understanding what I'm working with not having API reference, considering myriad of packages and whatever Nest has :( |
@kamilmysliwiec what's eta for this. Waiting for it. |
Waiting for #969, so I can implement dynamic routing and then revisit this PR. It depends on all those things. |
@BrunnerLivio #969 was reverted. Is there any plan to continue with this PR? Really good work! 🚀 |
Really interested in this as well. |
I'd love to revisit this PR, though my day-to-day job is taking all of my energy at the moment. Though in case you're interested to contribute to it, here are some hints about my strategy; The main reason why this PR is frozen is that it needs quite some underlying change related to routing. My aim was to basically implement a similar architecture as the Angular documentation. In summary, the way the Angular documentation works is that it generates documents from various data sources (e,g, markdown, or typescript files) and translates it to HTML. This is mostly already done in this PR -- meaning you can expect that there are static HTML files that contain all the information about all the classes which exist in NestJS. Now the part which I was unable to finish so far: Sounds easier than it actually is. On of the reason for that is that the HTML files can contain Angular components (e.g. for displaying the code). Angular components can not load dynamically when you load an external HTML content and place it via e.g. On top of that, the Angular team has written its own router, since Now steps forwards; I think it would make sense to have a closer look at Scully. I haven't gotten my hands dirty with it yet, but in case it works similar to GatsbyJS, then it is definitely something we should use in order to make this PR happen. With that we could by-pass all of the routing stuff mentioned above. So in short; I'd love to see a PoC with Scully and see whether this person could dynamically create pages using HTML content provided by this PR with Angular components from the NestJS docs. Depending on the PoC, I think we should then either pursue it or re-visit the "Angular documentation"-approach |
Someone just asked me privately how to run this branch locally in 2022. Here are updated instructions:
|
Any update on this? |
i guess, i'll have to clone the project and |
Is nestjs abandoned? |
@knownasilya what gave you that idea? Kamil is literally working on the v10 branch and has been for the past few weeks. Just because this API docs that was an experimental branch hasn't been merged does not mean it's anywhere close to abandoned. |
Wasn't aware of v10 work, seems that api reference docs would be ultra high priority for a project like this. |
BTW @jmcdo29 you have always been very helpful whenever I had questions, so thanks! |
You can navigate to this repository https://github.com/nestjs/nest, press |
Question is not just having the list of public API; without proper description for each entry it's just a small part of the solution. All of the APIshould be properly documented as well. For example, there's a very interesting thing in Core called DiscoveryService. How a developer is supposed to learn how it works and what it can be used for? By reading the source? Or other repositories which are built upon it? That's suboptimal. |
I agree that there're still things we should document better, but that was not the point of my comment above. |
Regarding you comment above, Kamil: I personally didn't know one could press |
Hi everyone, 😀 👋🏻 Since many people ask me if the PR will be continued, also to reassure and clarify the situation, I wanted to announce that the new version of the Api Docs (v2.0 beta) for NestJS 😻 I will start by anticipating a few things:
I would like to take this opportunity to heart thank @BrunnerLivio We hope this work of ours will help people using NestJS to better understand the framework and be a great starting point for the Api Docs for NestJS 🙌 . I also repeat it here, The biggest work is to be done in the official NestJS repositories so that more detailed descriptions can be added. Perhaps I was a little long in my description, but I wanted to start by specifying a few points well. 🙏🏻 I conclude by attaching some photos of how it looks now (screenshot taken in dark mode) 😎. coming soon, the story continues 👀........ 🙌 |
Thanks for clarifying @Tony133, looking forward to it |
Hi all 😀 👋🏻, as promised, here is the link to access the Api Docs v2.0-beta for NestJS: Link: https://api-references-nestjs.netlify.app 🔥 🚀 Lately we have also added a drop-down menu to switch between NestJS version 9 and version 10. 🙌 I add below some technical notes as described in the previous post:
do not have the Currently it is necessary to maintain and synchronize the forks of these packages (which I am managing), because we need to add the JSDoc @publicapi comments, so that the API generator knows what is considered an export that is part of the API, and it is a bit problematic to maintain. Currently only the following packages have the JSDoc
In addition to the nest repository (https://github.com/nestjs/nest), within the monorepository are the general and essential NestJS packages, which are as follows:
I conclude by leaving you with this question: Which official packages do you find most useful to have in an Api Docs for NestJS ?
This point is an open question on which I think it is fair for the entire community of developers using NestJS to give their input, as well as members of the core team, to decide which way to go. Most likely this will be the last chance for NestJS to have its own Api Reference, not all frameworks have it it is true, but I think it is very useful for those who use NestJS and also for "newcomers" who are using it. There is always a saying, "Some 'opportunities' when they pass you have to seize them on the fly." This "poll and discussion" however will go on for a while until the next major release of NestJS (v11.x), then we will see if we extend it further. Mark this date: July 7, 2023, NestJS to a working prototype of Api Docs as a great starting point, hoping that one day it will become the official one. 😻 I have gone on and on in this post, but I like to specify things well 😄. I hope you can appreciate this work started by @BrunnerLivio 4 years ago and carried on by me always with his supervision 🙌, and that it can be useful during your projects with NestJS.😻 🙏🏻 P.s: We are considering whether to open a post on the Discord support channel to move all feedback maybe there, we are still considering with @BrunnerLivio how to proceed. In case of updates we will write you! 😉👍 |
Two small updates 👀: In these weeks after the launch, I also made a DEV.to post about this prototype see here: https://dev.to/tony133/api-docs-v20-beta-prototype-for-nestjs-3jdj , so it would be even more visible 🚀 🌎, and I also created a thread in the discord support channel (direct link to the thread): https://discord.com/channels/520622812742811698/1128439541326417962 💪 That is all 😉 👍 |
Every framework I know documents its API, this should be a priority. |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
No detailed API documentation
Issue Number: #249
What is the new behavior?
Adds an API page which displays detailed information of all the exposed classes / constants / interfaces / etc. of NestJS.
Does this PR introduce a breaking change?
Other information