Node.js or Express.js REST API document generator
node.jsExpressnode.js Problem Overview
I'm working on a restAPI using Express.js and I'm wondering if there is a way for me to generate API documents that allow a user to view API definitions or possibly even try out the API call?
node.js Solutions
Solution 1 - node.js
What you are looking for is a good JavaScript documentation generator. I found a decent one here http://apidocjs.com/example/. This will allow you to use just Express as OP asked.
Swagger isn't for generating docs, it's for making APIs. So you are going to need to learn a full system to get that feature.
I found a couple more here that I haven't fully looked into yet which seem promising:
Docco here JSDoc here and an article on Documentor for Node
Solution 2 - node.js
Swagger is an amazing project for auto generating API documentation. It includes an Express module.
Solution 3 - node.js
I found this library to be very useful when it comes to keeping your documentation and route declaration logic close together:
Solution 4 - node.js
If you use Postman while developing you might already have a Postman collection containing the most relevant calls. If that is the case Postman has a docs feature https://learning.postman.com/docs/publishing-your-api/documenting-your-api/