Skip to content
API documentation generator for Mono projects.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.nuxt
assets
components
directives
layouts
lib
pages
plugins
static
store
.editorconfig
.eslintrc.js
.gitignore
LICENSE
README.md
nuxt.config.js
package-lock.json
package.json

README.md

Mono Doc

API Documentation module for Mono

npm version Travis Coverage license

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.

You can’t perform that action at this time.