1.1.5 • Published 4 years ago
egg-shell-change v1.1.5
egg-shell-change
这个项目是修改而来的 原来的项目是egg-shell-decorators
, 但是似乎满足不了需求 所以我就增加了一些功能
添加了两个配置到了 swaggerOpt
里, 分别是
deprecatedRouters (弃用的路由)
有一些路由其实已经弃用了 但是还没有删除,所以需要标记为弃用。但是
egg-shell-decorators
似乎没有提供这样的配置,所以我就增加了这个配置项, 使用方法在下面的Example
里面exceptionRouters (例外的路由)
Example
EggShell(app, {
quickStart: true,
swaggerOpt: {
open: true,
title: 'apis',
description: 'project description',
version: '1.0.0',
host: 'api.ahs.wiki',
port: 443,
schemes: [ 'https' ],
paths: {
outPath: './app/public/swagger-ui/json/main.json',
definitionPath: './app/definitions',
swaggerPath: './app/swagger',
},
deprecatedRouters: [
{
path: '/user/forget-pwd',
method: 'post'
}
],
exceptionRouters: [
{
path: '/user/login',
method: 'post',
detail: {} // swagger UI configs
}
]
},
})