Lwdthe1/jsdoc-rest-api

Which lib to generate documentation?

damieng57 opened this issue · 1 comments

Hello,

Thank for your great lib. Really useful. However, I have a question, Which lib should I used to generate my documentation? I read documentation without found any indication.
JsDoc and ApiDocJS doesn't work - or I don't know how to configure.
In a first time, I make some modification to use a jsdoc plugin (jsdoc-http-plugin) and use @response to mock response sever but it's not convincing.

Hey @damieng57 thanks for trying it. Thanks for your patience. As for generating documentation, that isn't something I've gotten around to yet. However, that was considered when designing the package.

Are you looking for the documentations to be exported as HTML or just an object with all the attached api endpoint definitions?

If you call generateRoutes() all the route definitions are returned in an object. And if you call attachExpressAppEndpoints() the route definitions are also returned. With the definitions, you can generate your own docs.

If you want the documentation automatically generated as HTML, that is something we should be able to easily create. What are you thinking?