0.2.1 • Published 7 years ago

egg-swagger-ui v0.2.1

Weekly downloads
5
License
MIT
Repository
github
Last release
7 years ago

egg-swagger-ui

swagger-ui plugin for egg.

Information

  • swagger-ui 3.0.6

Usage

First, install it:

npm install -S egg-swagger-ui

Import it via config/plugin.js:

module.exports = {
  ...

  'swagger-ui': {
    enable: true,
    package: 'egg-swagger-ui'
  }

  ...
}

Configure it via config/config.<env>.js:

module.export = {
  swaggerUi: {
    mountPath: '<routePath>'
    swaggerFile: '/path/to/swaggerFile'
  }
}

Default value:

  • routePath: /docs
  • swaggerFile: assets/default-swagger.yaml - the example swagger file bundled with egg-swagger-ui

License

MIT