blueprinter-cli
v1.0.5
Published
A tool for generating API Blueprint document.
Downloads
6
Readme
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