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

Add API documentation #2688

Merged
merged 5 commits into from
Aug 26, 2019
Merged

Conversation

BrunnerLivio
Copy link
Member

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[x] Other... Please describe:
Documentation

Does this PR introduce a breaking change?

[ ] Yes
[x] No

@coveralls
Copy link

coveralls commented Jul 31, 2019

Pull Request Test Coverage Report for Build 4086

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 95.236%

Totals Coverage Status
Change from base Build 4084: 0.0%
Covered Lines: 3638
Relevant Lines: 3820

💛 - Coveralls

packages/common/cache/cache.module.ts Show resolved Hide resolved
export interface NestApplicationOptions extends NestApplicationContextOptions {
/**
* CORS options from [Express CORS package](https://github.com/expressjs/cors#configuration-options)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the cors option is also usable for Fastify, right? I think we should not add an express link in that case.

* @returns {void}
*/
setGlobalPrefix(prefix: string): this;

/**
* Setup Ws Adapter which will be used inside Gateways.
* Use, when you want to override default `socket.io` library.
* Use when you want to override default `socket.io` library.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Use when you want to override default `socket.io` library.
* Use when you want to override default `socket.io` library.

Could be anything - lets not assume it is socket.io

packages/core/PACKAGE.md Outdated Show resolved Hide resolved
@BrunnerLivio
Copy link
Member Author

@kamilmysliwiec The commit history is currently a mess - would you be ok with squashing all the commits into one?

@johnbiundo
Copy link
Member

I've been tracking my progress here: https://docs.google.com/spreadsheets/d/1M80PQuiyQznHbi802QLhvSeWF9Tba6jJeqtc2wY0YZU/edit?usp=sharing

I've been noting a bunch of questions/comments there that might be worth looking at once you've done a basic review.

@BrunnerLivio
Copy link
Member Author

@kamilmysliwiec more information on the tag definitions, see here

@kamilmysliwiec
Copy link
Member

Can we merge it already? :) (at least everything what we have so far)

@BrunnerLivio
Copy link
Member Author

Lets rebase first. @johnbiundo ping me on Discord if you need assistance :)

@johnbiundo
Copy link
Member

@BrunnerLivio I am not sure how soon I can get to this as I'm serving on jury duty the rest of this week. Feel free to proceed with this if you would like :)

@BrunnerLivio BrunnerLivio force-pushed the feature/api-docs branch 2 times, most recently from 3c510ad to 9edd044 Compare August 15, 2019 15:26
@BrunnerLivio
Copy link
Member Author

BrunnerLivio commented Aug 15, 2019

There we go, squashed into 6 commits. @johnbiundo you are still the author for your commits :)

@johnbiundo
Copy link
Member

Awesome. Thanks @BrunnerLivio

@kamilmysliwiec kamilmysliwiec changed the base branch from master to 6.6.0 August 24, 2019 09:02
@kamilmysliwiec
Copy link
Member

@johnbiundo a few notes:

  • why @publicApi is sometimes at the beginning of the comment (usually it's located at the end)?
  • some comments aren't available in the .d.ts files (I sent you a screenshot on Discord)

@kamilmysliwiec kamilmysliwiec added this to the 6.6.0 milestone Aug 24, 2019
@johnbiundo
Copy link
Member

@kamilmysliwiec Thanks for the review.

re: @publicApi: just an inconsistency on my part since we started with it at the top. I've been gradually correcting it since we decided it belongs at the bottom.

re: comments in overloaded functions/methods: Same: once we discovered the pattern, I've been trying to reproduce a slightly different (mainly, in signature only) version of the comment for each overloaded method. I'll eventually make a final pass through all of them and make sure this is done.

@kamilmysliwiec
Copy link
Member

Thanks for clarification @johnbiundo. For the sake of consistency (publicApi), can we move them all at the bottom before we merge this PR?

Same: once we discovered the pattern, I've been trying to reproduce a slightly different (mainly, in signature only) version of the comment for each overloaded method. I'll eventually make a final pass through all of them and make sure this is done.

That would be awesome!

@kamilmysliwiec kamilmysliwiec modified the milestones: 6.6.0, 6.7.0 Aug 26, 2019
@johnbiundo
Copy link
Member

@kamilmysliwiec will do (re: @publicApi ASAP.

@BrunnerLivio BrunnerLivio force-pushed the feature/api-docs branch 2 times, most recently from e6a4c56 to 2ee5a99 Compare August 26, 2019 19:59
@BrunnerLivio BrunnerLivio force-pushed the feature/api-docs branch 3 times, most recently from 15989bb to e9ecb5e Compare August 26, 2019 20:11
@BrunnerLivio
Copy link
Member Author

BrunnerLivio commented Aug 26, 2019

@kamilmysliwiec: @johnbiundo and I realized we had not pushed Johns last commits. We did a recovery mission and now it is restaged as before (same commit history). From the formatting: Now @publicApi is always at the last position of the comment and @description is completely removed :)

  • Merge conflicts resolved with 6.6.0 branch

@kamilmysliwiec
Copy link
Member

Amazing job! Thanks guys, let me pull this branch

@kamilmysliwiec
Copy link
Member

Such an amazing piece of work! Thanks again, merging to 6.6.0 branch :)

@kamilmysliwiec kamilmysliwiec modified the milestones: 6.7.0, 6.5.4, 6.6.0 Aug 26, 2019
@kamilmysliwiec kamilmysliwiec merged commit 464c2bb into nestjs:6.6.0 Aug 26, 2019
@fwoelffel
Copy link
Contributor

Hi guys! Thanks for this amazing work 👏
I'm wondering if this documentation will get published somewhere?

@BrunnerLivio
Copy link
Member Author

BrunnerLivio commented Sep 9, 2019

Hi @fwoelffel. This PR is related to two goals:

  • Improve DX by having documentation in code, so VSCode can display it in your editor
  • Add visual API docs which can be displayed on docs.nestjs.com

I guess your question is regarding the online documentation? We are currently in the process for that quite some time. There is docs.nestjs.com#413 which already generates API docs in visual form.

This feature is quite a big change, therefore we broke it down in multiple tasks

  • Add API docs in the correct format to all integrations and packages - In Progress
  • Rewrite the documentation generator to dgeni - Done docs.nestjs.com#556
  • Remove all the src/app/pages/* components so all the content of the docs can be generated without adding a component - Todo docs.nestjs.com#549.
  • Add API docs - In progress docs.nestjs.com#413

Since I am currently quite busy with my job, I have trouble to push this further at the moment. I hope for more time in the future, but can't tell at the moment unfortunately. If you would like to contribute, let me know :)

@fwoelffel
Copy link
Contributor

Thanks for the quick response @BrunnerLivio
I'll check these tasks out and maybe provide some help with it if my time schedule allows for it :)

@BrunnerLivio
Copy link
Member Author

@fwoelffel that would be awesome. In general the next step I would have taken would have been docs.nestjs.com#549. If you need some guidance on how to do that, you should definitely read through the issue and you can also ping me on Discord for further guidance :)

@lock
Copy link

lock bot commented Dec 8, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Dec 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants