Ugrás a fő tartalomra

How can i automatically generate documentation from express.js api? [closed]

The developers are too lazy to write docs (e.g. in jsdoc), so I'm trying to find some automatic solution.
I want to automatically create docs from express.js api based on joi validation schema.
Is there a library or tool for it? Thanks

Example

For example from this pseudo code
router.post('/api', (req, res) => {
    req.validate({
        name: Joi.string().alphanum().min(2).max(30).required(),
        surname: Joi.string().alphanum().min(2).max(30).required(),
        birthYear: Joi.number().integer().min(1900).max(2013).required(),
        mail: Joi.string().email()
    });
    res.json({ it: 'works.' });
});
generate doc, which will look like (I don't care about the exact form of output):
Api: POST /api 
Parameters: name string[2-30, required] , surname string[2-30, required], birthYear int[1900-2013, required], mail string[email]
Response: 200 {it: 'works.'} 

closed as off-topic by RobC, Cœur, bigreddot, Joshua Nozzi, LotPings Jul 20 at 18:15

This question appears to be off-topic. The users who voted to close gave this specific reason:
  • "Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – RobC, Cœur, bigreddot, Joshua Nozzi, LotPings
If this question can be reworded to fit the rules in the help center, please edit the ques

Megjegyzések

Népszerű bejegyzések ezen a blogon

SW Documentation: Requirements

Requirements Nonfunctional Requirements Q&A FEBRUARY 17, 2010  ~  ANDREW STELLMAN ~  3 COMMENTS Non-functional requirements Q&A: We answer questions from readers about using  nonfunctional requirements  on a real software project, and how to use them on a real software project. Non-functional requirements: Planning out how well your software will work A couple of months ago I wrote a post called  Using nonfunctional requirements to build better software . It’s basically a step-by-step guide for creating an easy, practical technique to use nonfunctional requirements on a real software project, treating them in a way that’s similar to how a lot of Agile teams treat user stories, scenarios and other functional requirements: by sticking them on index cards and using them to do some lightweight planning. Since then, I’ve gotten a lot of questions about nonfunctional requirements (or, as some people call them, non functional requirements...

Privacy Notice for Visitors to Our Users’ Sites

Privacy Notice for Visitors to Our Users’ Sites Sections Who’s Who and What This Privacy Notice Covers Information We Collect About Visitors to Our Users’ Sites Information a Visitor Provides to a Site Information We Automatically Collect from the Site Other Information Provided by Our Users How We Use Visitor Information How We Share Visitor Information Other Tools Other Resources Hi there! This Privacy Notice explains how we, at Automattic, process information about the visitors of our users’ websites in connection with the services we provide through WordPress.com, Jetpack (including WooCommerce Services), IntenseDebate, Polldaddy.com, and Akismet. Read on! Who’s Who and What This Privacy Notice Covers Let’s talk first about who we are at Automattic, what we do, and what this Privacy Notice covers. We are the folks behind a variety of products and services designed to allow anyone–from bloggers, to small business owners, and enterprises–to create, publ...

THE RIGHT WAY TO WRITE A SINGLETON

THE RIGHT WAY TO WRITE A SINGLETON July 17, 2015 by   Hector Matos Even though I've written about the woes of managing state in my previous post, sometimes there's just no way we can avoid it. One example of managing state is something we're all quite acquainted with - The Singleton. The problem we find in Swift is that there are SEVERAL ways of implementing them. But which way is the right way? In this post I'm going to show you the history of the singleton and then show you the right way to implement the singleton in Swift. If you want to see the right way to implement the singleton pattern in Swift along with proof of it's "right-ness", you can scroll to the bottom of the post and see it there. :) A TRIP DOWN MEMORY LANE Swift is a natural evolution of Objective-C. In Objective-C, this is how we implemented the singleton: @interface Kraken : NSObject @end @implementation Kraken + ( instancetype ) sharedInstance { ...