1.0.5 • Published 6 years ago

blueprinter-cli v1.0.5

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

blueprinter

A tool for generating API Blueprint document.

Installation

$ npm i -g blueprinter-cli
$ blueprinter project_path [pattern] output_file

Usage

Write comments in source code

// entry

/**
 * @apib {entry}
 *
 * # An Example HTTP API
 *
 * This is an example http api.
 *
 */

// group entry

/**
 * @apib {group} group_api
 *
 * # Group A Group API
 *
 * This is a group api.
 *
 */

// group content

/**
 * @apib {group} group_api
 *
 */

// data structures

/**
 * @apib {data structures}
 *
 * ## ResponseData
 * - `id`: `1` (number) - response id
 *
 */

// general

/**
 * @apib
 *
 * ## A Sample API [/api/sample]
 *
 * ### Get Response [GET]
 *
 * + Response 200 (application/json)
 *
 *     + Attributes
 *
 *         + `data` (ResponseData) - indicates response data
             and more description text
 *
 */

Generate apib file

$ blueprinter '/usr/local/lib/node_modules/blueprinter' '**/*.md' example.apib

License

MIT

1.0.5

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago