后端版本服务器部署成功
This commit is contained in:
@@ -14,7 +14,7 @@ const options = {
|
||||
description: '开发环境服务器'
|
||||
},
|
||||
{
|
||||
url: 'https://your-domain.com/api/v1',
|
||||
url: 'https://webapi.jiebanke.com/api/v1',
|
||||
description: '生产环境服务器'
|
||||
}
|
||||
],
|
||||
@@ -97,37 +97,26 @@ const options = {
|
||||
type: 'object',
|
||||
properties: {
|
||||
success: {
|
||||
type: 'boolean',
|
||||
description: '请求是否成功'
|
||||
},
|
||||
code: {
|
||||
type: 'integer',
|
||||
description: '状态码'
|
||||
},
|
||||
message: {
|
||||
type: 'string',
|
||||
description: '响应消息'
|
||||
type: 'boolean'
|
||||
},
|
||||
data: {
|
||||
type: 'object',
|
||||
description: '响应数据'
|
||||
type: 'object'
|
||||
},
|
||||
message: {
|
||||
type: 'string'
|
||||
},
|
||||
timestamp: {
|
||||
type: 'string',
|
||||
format: 'date-time'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
security: [
|
||||
{
|
||||
bearerAuth: []
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
apis: [
|
||||
'./src/routes/*.js',
|
||||
'./src/controllers/*.js'
|
||||
]
|
||||
apis: ['src/routes/*.js', 'src/controllers/*.js']
|
||||
}
|
||||
|
||||
const specs = swaggerJsdoc(options)
|
||||
const swaggerSpec = swaggerJsdoc(options)
|
||||
|
||||
module.exports = specs
|
||||
module.exports = swaggerSpec
|
||||
Reference in New Issue
Block a user