Generates a RESTful web API Documentationusing the apidoc library.
/path/api/stuff.js
:
/**
* @api {get} /user/:id Request User information
* @apiName GetUser
* @apiGroup User
*
* @apiParam {Number} id Users unique ID.
*
* @apiSuccess {String} firstname Firstname of the User.
* @apiSuccess {String} lastname Lastname of the User.
*/
Install with npm
npm install --save-dev webpack-apidoc
const Apidoc = require('webpack-apidoc'),
..
plugins: [
new Apidoc({
src: "example/",
dest: "build/"
})
]
..
With options:
..
plugins: [
new Apidoc({
src: "example/",
dest: "build/",
template: "template/",
debug: true,
includeFilters: [ ".*\\.js$" ]
})
]
..
Other options checkout.
The folder to scan for apidoc documentation.
Type: String
The folder where to output the generated files.
Type: String
Default: doc/
Custom template to use for the output files.
Type: String
Type: String
Default: options.src
Type: Boolean
Default: false
Type: Boolean
Default: false
Type: Boolean
Default: false
Type: Boolean
Default: false
Type: Array
Default: []