# api-doc-parser

> Transform a Hydra API documentation in an intermediate representation that can be used for various tasks such as creating smart API clients, scaffolding code or building admininistration interfaces.

Latest version **0.2.1** (published 2017-09-07) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

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

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2017-09-07 |
| First published | 2017-03-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Kévin Dunglas |
| Maintainers | dunglas |

## Links

- npm: https://www.npmjs.com/package/api-doc-parser
- Repository: https://github.com/dunglas/api-doc-parser
- Issues: https://github.com/dunglas/api-doc-parser/issues
- npm.io page: https://npm.io/package/api-doc-parser

## Dependencies (2)

- [jsonld](https://npm.io/package/jsonld.md) ^0.4.11
- [babel-runtime](https://npm.io/package/babel-runtime.md) ^6.23.0

## Recent versions

- 0.2.1 (latest) — 2017-09-07
- 0.2.0 — 2017-09-05
- 0.1.7 — 2017-07-20
- 0.1.6 — 2017-05-29
- 0.1.5 — 2017-03-27
- 0.1.3 — 2017-03-27
- 0.1.2 — 2017-03-27
- 0.1.1 — 2017-03-23
- 0.1.0 — 2017-03-23

## README

# API Doc Parser

`api-doc-parser` is a JavaScript (ES6) library to parse [Hydra](http://hydra-cg.com) API documentations and transform them
in an intermediate representation. This data structure can then be used for various tasks such as creating smart API clients,
scaffolding code or building administration interfaces.

It plays well with the [API Platform](https://api-platform.com) framework.

[![Build Status](https://travis-ci.org/dunglas/api-doc-parser.svg?branch=master)](https://travis-ci.org/dunglas/api-doc-parser)

## Install

With [Yarn](https://yarnpkg.com/):

    yarn add api-doc-parser

Using [NPM](https://www.npmjs.com/):

    npm install api-doc-parser

If you plan to use the library with Node, you also need a polyfill for the `fetch` function:

    yarn add isomorphic-fetch

## Usage

```javascript
import parseHydraDocumentation from 'api-doc-parser/lib/hydra/parseHydraDocumentation';

parseHydraDocumentation('https://demo.api-platform.com').then(({api}) => console.log(api));
```

## Support for other formats (Swagger/OpenAPI, API Blueprint, JSONAPI...)

API Doc Parser is designed to parse any API documentation format and convert it in the same intermediate representation.
For now, only Hydra is supported but if you develop a parser for another format, please [open a Pull Request](https://github.com/dunglas/api-doc-parser/pulls)
to include it in the library.

## Run tests

    yarn test
    yarn lint

## Credits

Created by [Kévin Dunglas](https://dunglas.fr). Sponsored by [Les-Tilleuls.coop](https://les-tilleuls.coop).

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