这是我第一次使用 apiDocs,我完全按照提供的文档进行操作。问题是我正在定义 apiName 和 apiGroup 但输出中只显示 apiGroup 。这是我的定义:
/**
* @apiVersion 1.0.0
* @api {post} /users/register
* @apiGroup users
* @apiName register
* @apiDescription Register new user
* @apiParam {String} userName User email address
* @apiParam {String} passWord User password
* @apiSuccess {json} response error, message
* @apiSuccessExample {json} Success-Response:
* HTTP/1.1 200 OK
* {
* "error": false,
* "message": "USER_CREATED_SUCCESSFULLY"
* }
* @apiError {json} error error, message
* @apiErrorExample {json} Error-USER_CREATE_FAILED:
* HTTP/1.1 200 Error creating user
* {
* "error": true
* ,"message" : "USER_CREATE_FAILED"
* }
*/
这是我的 apidoc.json:
{
"name": "T-Rex",
"version": "1.0.0",
"description": "API Document",
"title": "T-Rex",
"url": "https://apiusr.t-rex.io",
"template": {
"withCompare": true,
"withGenerator": true
}
}
但输出列表只是组名,忽略了 apiName:
users //apiGroup, it's ok
users //Should be @apiName, but showing the group
Delete user device association //@apiDescription, ok
其余的输出都很好。