1

I have a problem with my documentation of API. I want to make documentation, but @apiName doesn't appear... I tried to add @appVersion, but it didn't work.

This is my documentationenter image description here

/**
 * @api {post} /createBook
 * @apiGroup Books
 * @apiName CreateBook
 * @apiHeaderExample {json} Header-Example:
 *     {
 *       "Authorization": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXlsb2FkIjp7InVzZXIiOjV9LCJpYXQiOjE1NTA3NzI0MjEsImV4cCI6MTU1MDg1ODgyMX0.2xQyS6PrBIH3mZS2qTmrMemXxVSTHNhdxCgl_4qY3pU"
 *     }
 * @apiParam {String} name something
 * @apiParam {String} yearOfRelease something
 * @apiParam {String} condition something
 * @apiParam {String} price something
 * @apiParam {String} images something
 * @apiSuccessExample {json} CreateBook-Success-Response : HTTP/1.1 2000k
 * {
 *  'status': 'Added',
 *  'description': 'Book was added'
 * }
 */

This is my code... Does anybody solve that problem? Thank you

David Kadlcek
  • 456
  • 1
  • 4
  • 18

2 Answers2

1

It is used for the naming and the navigation names.

<ul class="sidenav nav nav-list">
<li class="nav-fixed nav-header" data-group="_">
<li class="nav-header" data-group="User">
<li data-version="0.3.0" data-name="GetUser" data-group="User">
<a href="#api-User-GetUser">Read data of a User</a>
</li>

Later the name should be used for inline linking (not implemented yet).

I have to update the docs, the apiName change and is now optional. The name is automatically generated from type und path: @api {type} /path/ -> internal autogenerate this @apiName TypePath if apiName is not set.

via github https://github.com/apidoc/apidoc/issues/259

Wilbur
  • 33
  • 3
1

I have implemented it this way:

/**
 * @api {get} /alerts/param? Get target alerts by target action ids
 * @apiGroup ALERT
 * @apiName Alert Information
 *
 *

Image

you can try this:

/**
 * @api {post} /createBook Create a new Book
 * @apiGroup Books
 * @apiName CreateBook
 .....