0

複数のパスを処理し、それに基づいてさまざまなことを実行できるサーブレットがあります。http://apidocjs.comを使用してクラス ファイル内のさまざまな関数を文書化したいのですが、2 つを表示する方法がわかりません。これを試すと(以下を参照)、最初のものだけが表示されます:

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

1 に答える 1

1

それを2つのコメントブロックに分割すると、うまくいくことがわかりました:

/**
 * @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):
 *     {
 *          ...
 *     }
 */
于 2016-06-20T20:21:17.270 に答える