Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/okoala/egg-swaggerbox
swagger box for egg
https://github.com/okoala/egg-swaggerbox
egg egg-plugin swagger swagger-router swagger-runner swagger-ui
Last synced: 3 months ago
JSON representation
swagger box for egg
- Host: GitHub
- URL: https://github.com/okoala/egg-swaggerbox
- Owner: okoala
- License: mit
- Created: 2018-10-02T04:45:04.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-01-30T06:55:11.000Z (almost 6 years ago)
- Last Synced: 2024-10-11T00:46:49.658Z (3 months ago)
- Topics: egg, egg-plugin, swagger, swagger-router, swagger-runner, swagger-ui
- Language: JavaScript
- Homepage:
- Size: 2.17 MB
- Stars: 4
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# egg-swaggerbox
swagger useful module for egg.
[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![Test coverage][codecov-image]][codecov-url]
[![David deps][david-image]][david-url]
[![Known Vulnerabilities][snyk-image]][snyk-url]
[![NPM download][download-image]][download-url][npm-image]: https://img.shields.io/npm/v/egg-swaggerbox.svg?style=flat-square
[npm-url]: https://npmjs.org/package/egg-swaggerbox
[travis-image]: https://img.shields.io/travis/okoala/egg-swaggerbox.svg?style=flat-square
[travis-url]: https://travis-ci.org/okoala/egg-swaggerbox
[codecov-image]: https://img.shields.io/codecov/c/github/okoala/egg-swaggerbox.svg?style=flat-square
[codecov-url]: https://codecov.io/gh/okoala/egg-swaggerbox
[david-image]: https://img.shields.io/david/okoala/egg-swaggerbox.svg?style=flat-square
[david-url]: https://david-dm.org/okoala/egg-swaggerbox
[snyk-image]: https://snyk.io/test/npm/egg-swaggerbox/badge.svg?style=flat-square
[snyk-url]: https://snyk.io/test/npm/egg-swaggerbox
[download-image]: https://img.shields.io/npm/dm/egg-swaggerbox.svg?style=flat-square
[download-url]: https://npmjs.org/package/egg-swaggerbox## Install
```bash
$ npm i egg-swaggerbox --save
```## Usage
```js
// {app_root}/config/plugin.js
exports.swaggerdoc = {
enable: true,
package: "egg-swaggerbox"
};
```## Configuration
```js
// {app_root}/config/config.default.js
exports.swaggerbox = {
apiInfo: {
title: "egg-swagger",
description: "swagger-ui for egg",
version: "1.0.0"
},
ui: {
prefix: "/",
dir: path.join(__dirname, "../app/public"),
dynamic: true,
preload: false,
buffer: false,
maxFiles: 1000
}
};
```see [config/config.default.js](config/config.default.js) for more detail.
## Questions & Suggestions
Please open an issue [here](https://github.com/okoala/egg-swaggerbox/issues).
## License
[MIT](LICENSE)