egg plugin,support swagger-ui 2.0.
$ npm i egg-swagger --save
// {app_root}/config/plugin.js
exports.swagger = {
enable: true,
package: 'egg-swagger',
};
// {app_root}/config/config.default.js
exports.swagger = {
enable: true,
mountPath: '/test-mount', // swagger-ui address <domain>/test-mount
swaggerFilePath: '/test-swagger.json', // swagger file default path
enableGoogleFont: false,
};
see config/config.default.js for more detail.
- swagger-ui 对外开放 restful api
Please open an issue here.