mono-doc

0.6.12 • Public • Published

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.

Package Sidebar

Install

npm i mono-doc

Weekly Downloads

0

Version

0.6.12

License

MIT

Unpacked Size

2.21 MB

Total Files

58

Last publish

Collaborators

  • atinux
  • benjamincanac