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
):
moduleexports = mono: modules: 'mono-doc'
Configuration
Mono Doc will use the doc
property of your configuration (example: conf/development.js
):
moduleexports = 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:
moduleexports = 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.