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

Missing Documentation #1400

Closed
stevehipwell opened this issue Jul 5, 2017 · 11 comments
Closed

Missing Documentation #1400

stevehipwell opened this issue Jul 5, 2017 · 11 comments

Comments

@stevehipwell
Copy link

The current v5 documentation is an improvement on what we had before but it still isn't good enough for me to write the new TypeScript definitions from.

Documentation issues:

  • Change server.version to be server.versions

Missing documentation:

  • API documentation for Router/Route
  • Update server options values to reflect all options
    • Undocumented options are referenced in the comment for httpsServerOptions
  • Request and Response properties documented like server properties
@essuraj
Copy link

essuraj commented Jul 6, 2017

Also breaking changes if any ... nevermnif found here .. but would love it on the site

@retrohacker
Copy link
Member

@essuraj absolutely. This probably belongs under the guides sidebar in docs. Submitting a PR now 😄

@stevehipwell thank you for helping us find short-comings in the documentation ❤️ we shipped knowing there were gaps but we have far more work on the project than maintainers can tackle at the moment, though our team is growing 🎉.

Our hope in shipping the code base was that the community would help us identify and fill in the gaps. Before the 5.x release, we didn't have a great process for accepting documentation contributions from the community. I prioritized the new website so that we had a solid process to accept documentation contributions 😄 the docs in this repo (under ./docs) are used to populate the Docs tab on the new website so a simple PR agains those will result in the website being updated.

Keeping issues and PRs on this repo flowing has taken up a majority of my time post-release. I probably won't get to a documentation deep dive for a few weeks. Between now and then, possibly one of the community members or another maintainer will have a few cycles to help out on this ❤️

@retrohacker
Copy link
Member

@essuraj https://restify.github.io/docs/4to5/

@stevehipwell
Copy link
Author

@retrohacker - I have tried to figure out what was part of the restify public API when updating the TypeScript typings for v5. I'm happy that I've got the correct functions but I'm less happy that I've got the public values right. To get these perfect I'm more interested in a basic list of the API surface rather than full documentation. Obviously as the documentation improves I'll be able to improve the typings intellisense.

@retrohacker
Copy link
Member

@stevehipwell thank you for all of the time you are investing in helping the restify TypeScript community <3

Are the JSDoc type definitions enough for what you need? Each function should have them. I.E. https://github.com/restify/node-restify/blob/5.x/lib/server.js#L70-L71

@stevehipwell
Copy link
Author

@retrohacker - That's my pleasure, I'm a big fan of restify and want to make it the first choice TypeScript REST API for node.

The JSDoc type definitions are great for the functions but I really need to know what values (e.g. server.log) are considered public. I've got values in my definition that I think are correct but I can't be 100% sure and I don't want to expose implementation details that aren't meant to be part of the public API.

@retrohacker
Copy link
Member

I believe we have a convention of prepending _ to properties and methods that are intended to be internal. For properties that have a JSDoc definition, we also use @private.

It should be safe to assume that properties without a prepended underscore and/or the @private tag are public 😄 there may be a few cases where we are inconsistent but we can fix those with a PR moving forward ❤️

@stevehipwell
Copy link
Author

👍

@hekike
Copy link
Member

hekike commented Oct 21, 2017

@stevehipwell take a look to the new JSDoc based documentation it should contain all the parameters with types:

https://github.com/restify/node-restify/tree/master/docs/_api

@stevehipwell
Copy link
Author

Thanks @hekike

@retrohacker
Copy link
Member

🎉 you are amazing @hekike, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants