2016-06-20 4 views
0

У меня есть сервлет, который может обрабатывать несколько путей и делать разные вещи на основе этого. Я хочу документировать различные функции в файле класса, используя http://apidocjs.com, но не могу понять, как получить два изображения. Когда я пытаюсь это (смотрите ниже) только первый индикатор показывает:Как работают два @apiName в одном файле класса в apiDocJ?

/** 
* @api {get} /authenticate/user? 
* @apiName Authenticator 
* @apiGroup Authentication 
* 
* @apiDescription Authenticate a user 
* 
* @apiSampleRequest /authenticate/user 
* 
* @apiParam {String}   username     User name 
* @apiParam {String}   password     User password 
* 
* @apiSuccess {JSONObject}  user      User 
* 
* @apiExample Success-Response (example): 
*  { 
*  ... 
*  } 
* 
* @apiExample Error-Response (example): 
*  { 
*   ... 
*  } 
* 
* @api {get} /authenticate/app? 
* @apiName Authenticator 
* @apiGroup Authentication 
* 
* @apiDescription Authenticate an app 
* 
* @apiSampleRequest /authenticate/app 
* 
* @apiParam {String}   appId     App Id 
* @apiParam {String}   appKey     Secret Key 
* 
* @apiSuccess {JSONObject}  app      App 
* 
* @apiExample Success-Response (example): 
*  { 
*  ... 
*  } 
* 
* @apiExample Error-Response (example): 
*  { 
*   ... 
*  } 
*/ 

ответ

1

Просто обнаружил, если вы разбить его на два комментария блоков, он будет работать:

/** 
* @api {get} /authenticate/user? 
* @apiName Authenticator 
* @apiGroup Authentication 
* 
* @apiDescription Authenticate a user 
* 
* @apiSampleRequest /authenticate/user 
* 
* @apiParam {String}   username     User name 
* @apiParam {String}   password     User password 
* 
* @apiSuccess {JSONObject}  user      User 
* 
* @apiExample Success-Response (example): 
*  { 
*  ... 
*  } 
* 
* @apiExample Error-Response (example): 
*  { 
*   ... 
*  } 
*/ 

/** 
* @api {get} /authenticate/app? 
* @apiName Authenticator 
* @apiGroup Authentication 
* 
* @apiDescription Authenticate an app 
* 
* @apiSampleRequest /authenticate/app 
* 
* @apiParam {String}   appId     App Id 
* @apiParam {String}   appKey     Secret Key 
* 
* @apiSuccess {JSONObject}  app      App 
* 
* @apiExample Success-Response (example): 
*  { 
*  ... 
*  } 
* 
* @apiExample Error-Response (example): 
*  { 
*   ... 
*  } 
*/