3

When I generate my API documentation, the links to each individual API on the left hand side of the index page are currently being generated from the description of the API.

@api {post} /my/endpoint **this is the current link name**

I would like the link name to be a combination of the method type (in the above example post) and the @apiName. For this block comment:

@api {post} /my/endpoint description of API
@apiName Create Cake

I would like the link text for this API to be POST - Create Cake

Is there anyway to do this?

Lloyd Banks
  • 35,740
  • 58
  • 156
  • 248

1 Answers1

0

You can use your own templates, by copying the template/ folder; see http://apidocjs.com/#template

For what you want to achieve, in index.html, in the first block, add

<span class="method">{{ type }}</span>

and add a rule in style.css :

.method { text-transform: uppercase }

You also can change the call to {{ title }} to a call to {{ name }} (It seems to be the case in the template today)

Pierre-Olivier Vares
  • 1,687
  • 15
  • 20