New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

api-doc-generator

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

api-doc-generator

REST API Documentation generator

latest
Source
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

API Docs Generator

Travis Status Codacy Badge Dependencies Status Download Status Version Status

A simple wrapper for generating REST API documentation based on Dox parser and Milligram CSS framework. Its goal is to make your JSDoc comments as human-friendly as possible. It provides a simple syntax and displays colorized documentation.

A simple wrapper for generating REST API documentation

Demo

Try out the demo!

Hello, Docs!

Usage: api-doc-generator [options]

  Options:

    -h, --help                     output usage information
    -t, --title                    provide the document title
    -i, --input                    provide input file
    -o, --output                   provide output directory

  Examples:

    $ api-doc-generator --title My API Docs --input routes.js --output docs

Generator will create docs directory and put into the following files:

  • index.html
  • api-doc-generator.min.css
  • api-doc-generator.min.js

routes.js:

/**
 * Get a list of visible projects for authenticated user
 *
 * @section projects
 * @type get
 * @url /projects
 */
router.get('/projects', function () {});

/**
 * Create a project
 *
 * @section projects
 * @type put
 * @url /projects
 * @param {string} name
 * @param {string =} description
 */
router.put('/projects', function () {});

/**
 * Update a project
 *
 * @section projects
 * @type post
 * @url /projects/:id
 * @param {string} name
 * @param {string =} description
 */
router.post('/projects/:id', function () {});

/**
 * Delete a project
 *
 * @section projects
 * @type delete
 * @url /projects/:id
 */
router.delete('/projects/:id', function () {});

Installation

Install this globally and you'll have access to the api-doc-generator command anywhere on your system.

npm install -g api-doc-generator

or install it locally to your node_modules folder

npm install --save api-doc-generator

Keywords

nodejs

FAQs

Package last updated on 10 May 2017

Related posts