mono-doc
v0.6.12
Published
API Documentation module for Mono
Downloads
7
Readme
API Documentation module for Mono
Mono Doc generates your Mono REST API documentation.
Installation
npm install --save mono-doc
Then, in your configuration file of your Mono application (example: conf/application.js
):
module.exports = {
mono: {
modules: ['mono-doc']
}
}
Configuration
Mono Doc will use the doc
property of your configuration (example: conf/development.js
):
module.exports = {
mono: {
doc: {
baseUrl: '/documentation', // default: '/'
// Use nuxt.generate()
static: true, // default: false
staticPath: '...' // default: 'docs'
}
}
}
Routes
Mono Doc sees the definition of your Mono routes to generate the doc.
You can override it with the documentation
or doc
key inside Mono routes:
module.exports = [
{
method: 'GET',
path: '/hello',
// displays query and body params
validation: {
query: ...,
body: ...
},
handler: ...,
// override default generated doc
doc: {
name: 'This is my route',
description: 'My route is doing a great job'
}
}
]
Credits
mono-doc uses Nuxt.js to generate the documentation.
Logo created by Frederick Allen from the Noun Project.