2016-06-20 4 views
0

J'ai une servlet qui peut gérer plusieurs chemins et faire des choses différentes en fonction de cela. Je veux documenter les différentes fonctions dans le fichier de classe en utilisant http://apidocjs.com mais ne peux pas comprendre comment obtenir deux à montrer. Lorsque je tente ce (voir ci-dessous) que le premier apparaît:Comment deux @apiName fonctionnent dans un fichier de classe dans apiDocJs?

/** 
* @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): 
*  { 
*   ... 
*  } 
*/ 

Répondre

1

si vous venez de découvrir le diviser en deux blocs de commentaires, il fonctionnera:

/** 
* @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): 
*  { 
*   ... 
*  } 
*/