我@logisticinfotech/sails-hook-actions2-swagger
用来记录我的 REST API。我的端点如下所示:/ user /: uid / company /: cid
. 生成文档后,公司在两个 ID 之间崩溃,这使得端点看起来像这样:/ user /: uid /: cid
,不能留下。我不能解雇这家公司通过 Swagger UI 提交。
我的 swagger.js:
'PUT /user/:uid/company/:cid':{action: 'userCompany/add',
swagger: {
summary: 'Add user to company',
parameters: [{
in: 'path',
name: 'uid',
required: true,
type: 'string',
description: 'User account ID'
},
{
in: 'path',
name: 'cid',
required: true,
type: 'string',
description: 'Company ID'
}]
}
},
有人有什么想法吗?