uridoc
An URI document generator which works with JSDoc-type comments.
Last updated 8 months ago by libook .
MIT · Repository · Bugs · Original npm · Tarball
$ cnpm install uridoc 
SYNC missed versions from official npm registry.

URI Doc

An URI document generator which works with JSDoc-type comments.

Usage

Installation

npm install -g uridoc

Run

uridoc FileWithUriDefinition.js Document.md

URI Definition Demo

/**
 * @uri
 * This is a test API.
 * Just for testing.
 * @get /api/v1/:param1/test/:param2
 * @request
 *      @headers
 *          {String} header1 - First header.
 *          {Number} header2 - Second header.
 *      @params
 *          {String} param1 - First param.
 *          {Number} param2 - Second param.
 *      @query
 *          {String} query1 - First query.
 *          {Number} query2 - Second query.
 *      @body
 *          {
 *              "a": {String},
 *              "b": {Number}
 *          }
 * @response
 *      @headers
 *          {String} rheader1 - First header.
 *          {Number} rheader2 - Second header
 *      @body
 *          {
 *              "c": {String},
 *              "d": {Number}
 *          }
 */

GET /api/v1/:param1/test/:param2

This is a test API.

Just for testing.

Request:

Headers:

Name Type Description
header1 {String} First header.
header2 {Number} Second header.

Headers:

Name Type Description
param1 {String} First param.
param2 {Number} Second param.

Headers:

Name Type Description
query1 {String} First query.
query2 {Number} Second query.

Body:

{
  "a": {String},
  "b": {Number}
}

Response:

Headers:

Name Type Description
header1 {String} First header.
header2 {Number} Second header.

Body:

{
  "c": {String},
  "d": {Number}
}
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |