Api documentation route handler
: shell
: api-documentation
: middleware
: /modules/core/documentation/services/api-documentation-route-handler.js
ApiDocumentationRouteHandler
This handler registers itself as an Express middleware that handles a catchall route under /docs/api/* with a normal priority, for API documentation extracted from the source code of modules.
Kind: global variable
ApiDocumentationRouteHandler.register(scope, context)
Registers the API documentation middleware.
Kind: static method of ApiDocumentationRouteHandler
| Param | Type | Description |
|---|---|---|
| scope | object |
The scope. |
| context | object |
The context. |
| context.expressApp | object |
The Express application object. |
ApiDocumentationRouteHandler.getUrl(id) ⇒ string
Gets the URL for an API documentation topic (id prefix 'apidocs:').
Kind: static method of ApiDocumentationRouteHandler
Returns: string - The URL for the topic.
| Param | Type | Description |
|---|---|---|
| id | string |
The topic content item's id. |
ApiDocumentationRouteHandler.getId(url)
Gets the ID for a url, or null if not resolved.
Kind: static method of ApiDocumentationRouteHandler
| Param | Type | Description |
|---|---|---|
| url | string |
the URL to resolve. |