# api-doc-gen

> Generate API Markdown documentation from JS comments

Latest version **1.0.8** (published 2019-02-17) · ISC license · 0 weekly downloads

## Install

```sh
npm install api-doc-gen
pnpm add api-doc-gen
yarn add api-doc-gen
bun add api-doc-gen
```

Provides the command `api-doc-gen`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.8 |
| Published | 2019-02-17 |
| First published | 2019-02-13 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 10.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Romain Ginestou |
| Maintainers | rginestou |

## Links

- npm: https://www.npmjs.com/package/api-doc-gen
- Repository: https://github.com/rginestou/api-doc-gen
- Homepage: https://github.com/rginestou/api-doc-gen#readme
- Issues: https://github.com/rginestou/api-doc-gen/issues
- npm.io page: https://npm.io/package/api-doc-gen

## Dependencies (1)

- [minimist](https://npm.io/package/minimist.md) ^1.2.0

## Recent versions

- 1.0.8 (latest) — 2019-02-17
- 1.0.7 — 2019-02-13
- 1.0.6 — 2019-02-13
- 1.0.5 — 2019-02-13
- 1.0.4 — 2019-02-13
- 1.0.3 — 2019-02-13
- 1.0.2 — 2019-02-13
- 1.0.1 — 2019-02-13
- 1.0.0 — 2019-02-13

## README

# API Documentation Generator

Generates API routes Markdown documententation by parsing file comments.

Supports macro for fast and consistent documentation.

    node index.js --in example.js --out API.md --title "User Service"

```js
/**
 * @apiDefine UserExample
 *   "id": "6d9e0b4c17bc",
 *   "first_name": "John",
 *   "last_name": "Doe",
 */

/**
 * @apiDefine UserNotFoundError
 *
 * @apiError User not found
 *
 * @apiStatus HTTP/1.1 404 Not Found
 */

/**
 * @api {get} /
 * @apiDescription
 * Request User information
 *
 * @apiName GetUser
 * @apiGroup User
 *
 * @apiParam {String} id News unique ID
 *
 * @apiSuccess Success-Response:
 *
 * @apiStatus HTTP/1.1 200
 * {
 *  @apiUse UserExample
 * }
 *
 * @apiUse UserNotFoundError
 */

/**
 * @api {post} /
 * @apiDescription
 * Add User
 *
 * @apiName AddUser
 * @apiGroup User
 *
 * @apiParam {String} first_name User first name
 * @apiParam {String} last_name User last name
 * @apiParam {String} [age] User last name
 *
 * @apiSuccess Success-Response:
 *
 * @apiStatus HTTP/1.1 200
 * {
 *  @apiUse UserExample
 * }
 *
 * @apiUse UserNotFoundError
 */
```

---
_Source: https://npm.io/package/api-doc-gen · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
