0

I have a servlet that can handle multiple paths and do different things based on that. I want to document the different functions in the class file using http://apidocjs.com but cannot figure out how to get two to show up. When I try this (see below) only the first one shows up:

/**
 * @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):
 *     {
 *          ...
 *     }
 */
Don Rhummy
  • 24,730
  • 42
  • 175
  • 330

1 Answers1

1

Just discovered if you split it into two comment blocks, it will work:

/**
 * @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):
 *     {
 *          ...
 *     }
 */
Don Rhummy
  • 24,730
  • 42
  • 175
  • 330