# openapi-client-axios-typegen

> Typescript type generator for openapi-client-axios

Latest version **7.8.0** (published 2025-10-24) · MIT license · 0 weekly downloads

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

## Install

```sh
npm install openapi-client-axios-typegen
pnpm add openapi-client-axios-typegen
yarn add openapi-client-axios-typegen
bun add openapi-client-axios-typegen
```

Provides the command `typegen`.

## Health

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

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 7.8.0 |
| Published | 2025-10-24 |
| First published | 2019-05-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 8 |
| Unpacked size | 23 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 616 |
| Author | Viljami Kuosmanen |
| Maintainers | anttiviljami |
| Keywords | openapi, swagger, client, axios, typegen, frontend, browser, typescript |

## Links

- npm: https://www.npmjs.com/package/openapi-client-axios-typegen
- Repository: https://github.com/openapistack/openapi-client-axios
- Homepage: https://openapistack.co
- Issues: https://github.com/openapistack/openapi-client-axios/issues
- Funding: https://github.com/sponsors/anttiviljami
- npm.io page: https://npm.io/package/openapi-client-axios-typegen

## Dependencies (8)

- [axios](https://npm.io/package/axios.md) >=0.25.0
- [yargs](https://npm.io/package/yargs.md) ^17.3.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [indent-string](https://npm.io/package/indent-string.md) ^4.0.0
- [openapi-types](https://npm.io/package/openapi-types.md) ^12.1.0
- [openapi-client-axios](https://npm.io/package/openapi-client-axios.md) ^7.8.0
- [@anttiviljami/dtsgenerator](https://npm.io/package/@anttiviljami/dtsgenerator.md) ^3.20.0
- [@apidevtools/json-schema-ref-parser](https://npm.io/package/@apidevtools/json-schema-ref-parser.md) ^11.2.0

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 7.8.0 (latest) — 2025-10-24
- 0.0.0-1ccbc9d (beta) — 2021-12-11
- 7.7.0 — 2024-09-10
- 7.6.2 — 2024-06-12
- 7.6.1 — 2024-05-24
- 7.6.0 — 2024-01-29
- 7.5.4 — 2024-01-27
- 7.5.3 — 2024-01-27
- 7.5.2 — 2024-01-27
- 7.5.1 — 2023-12-20
- 7.5.0 — 2023-12-20
- 7.4.1 — 2023-11-09
- 7.4.0 — 2023-11-09
- 7.3.11 — 2023-10-09
- 7.3.10 — 2023-10-09
- … 80 more at https://npm.io/package/openapi-client-axios-typegen/versions

## README

# OpenAPI Client Axios Typegen
[![CI](https://github.com/openapistack/openapi-client-axios/workflows/CI/badge.svg)](https://github.com/openapistack/openapi-client-axios/actions?query=workflow%3ACI)
[![npm version](https://img.shields.io/npm/v/openapi-client-axios-typegen.svg)](https://www.npmjs.com/package/openapi-client-axios-typegen)
[![License](http://img.shields.io/:license-mit-blue.svg)](https://github.com/openapistack/openapi-client-axios/blob/main/LICENSE)

Type generator for [openapi-client-axios](https://github.com/openapistack/openapi-client-axios)

> **Tip:** It's recommended to use [`openapicmd typegen`](https://openapistack.co/docs/openapicmd/typegen/) to generate types instead of directly installing the openapi-client-axios-typegen package.

## Documentation

**New!** OpenAPI Client Axios documentation is now found on [openapistack.co](https://openapistack.co)

https://openapistack.co/docs/openapi-client-axios/intro

## Usage

```
Usage: typegen [file]

Options:
  --help     Show help                                                 [boolean]
  --version  Show version number                                       [boolean]

Examples:
  typegen ./openapi.yml > client.d.ts  - generate a type definition file
```

The output of `typegen` exports a type called `Client`, which can be used for instances created with `OpenAPIClientAxios`.

Both the `api.getClient()` and `api.init()` methods support passing in a Client type.

```typescript
import { Client as PetStoreClient } from './client.d.ts';

const client = await api.init<PetStoreClient>();
const client = await api.getClient<PetStoreClient>();
```

`typegen` supports using both local and remote URLs for OpenAPI definition files.

```
$ typegen ./petstore.yaml
$ typegen https://petstore3.swagger.io/api/v3/openapi.json
```

## Contributing

OpenAPI Client Axios Typegen is Free and Open Source Software. Issues and pull requests are more than welcome!

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