# doctyped

> Swagger-enabled flow types generator

Latest version **1.3.4** (published 2021-07-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install doctyped
pnpm add doctyped
yarn add doctyped
bun add doctyped
```

Provides the command `doctyped`.

## 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.3.4 |
| Published | 2021-07-02 |
| First published | 2018-01-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8.0.0 |
| Dependencies | 3 |
| Unpacked size | 19.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | NullDivision |
| Maintainers | nulldivision |
| Keywords | swagger, flow, models |

## Links

- npm: https://www.npmjs.com/package/doctyped
- Repository: https://github.com/NullDivision/doctyped
- Homepage: https://github.com/NullDivision/doctyped#readme
- Issues: https://github.com/NullDivision/doctyped/issues
- npm.io page: https://npm.io/package/doctyped

## Dependencies (3)

- [ejs](https://npm.io/package/ejs.md) ^3.0.1
- [got](https://npm.io/package/got.md) ^11.8.2
- [yargs](https://npm.io/package/yargs.md) ^17.0.1

## Recent versions

- 1.3.4 (latest) — 2021-07-02
- 1.3.3 — 2020-01-04
- 1.3.2 — 2019-01-14
- 1.3.1 — 2019-01-14
- 1.3.0 — 2019-01-14
- 1.2.0 — 2018-11-28
- 1.1.1 — 2018-05-27
- 1.1.0 — 2018-05-27
- 1.0.2 — 2018-04-21
- 1.0.1 — 2018-04-09
- 1.0.0 — 2018-04-07
- 0.3.0 — 2018-03-24
- 0.2.3 — 2018-01-12
- 0.2.2 — 2018-01-12
- 0.2.1 — 2018-01-12
- … 1 more at https://npm.io/package/doctyped/versions

## README

# doctyped · [![Build Status](https://travis-ci.com/NullDivision/doctyped.svg?branch=master)](https://travis-ci.com/NullDivision/doctyped)

## Description

Auto-generate Flow or TypeScript types from API documentation descriptions.

## Installing
`yarn add -D doctyped` or `npm install --save-dev doctyped`

## Usage
### Node
```javascript
import doctyped from 'doctyped/doctyped';

const types = doctyped('/path/to/descriptor');
```
The above code will generate an object containing all models and properties defined by the swagger descriptor.
This is useful if we want to run checks against types in the runtime environment.
Optionally, we can pass an options object `{ output: '/someoutput/path' }`as the second argument that will generate `js.flow` files.
### CLI
```
yarn doctyped -a <flow-or-ts> -o <destination-directory> <api-url>
```

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