# ya-open-api-types

> TypeScript types for OpenAPI 3.2

Latest version **2.2.0** (published 2026-04-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install ya-open-api-types
pnpm add ya-open-api-types
yarn add ya-open-api-types
bun add ya-open-api-types
```

## Health

**Score 60/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.2.0 |
| Published | 2026-04-16 |
| First published | 2025-01-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=24.14.0 |
| Dependencies | 3 |
| Unpacked size | 152.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Nicolas Froidure |
| Maintainers | nfroidure |

## Links

- npm: https://www.npmjs.com/package/ya-open-api-types
- Repository: https://github.com/nfroidure/ya-open-api-types
- Issues: https://github.com/nfroidure/ya-open-api-types/issues
- Funding: https://github.com/sponsors/nfroidure
- npm.io page: https://npm.io/package/ya-open-api-types

## Dependencies (3)

- [yerror](https://npm.io/package/yerror.md) ^11.0.0
- [type-fest](https://npm.io/package/type-fest.md) ^5.5.0
- [ya-json-schema-types](https://npm.io/package/ya-json-schema-types.md) ^2.0.2

## Recent versions

- 2.2.0 (latest) — 2026-04-16
- 2.1.3 — 2026-04-15
- 2.1.2 — 2026-04-07
- 2.1.1 — 2026-04-01
- 2.1.0 — 2026-03-30
- 2.0.3 — 2026-03-30
- 2.0.2 — 2026-03-30
- 2.0.1 — 2026-03-28
- 2.0.0 — 2026-03-27
- 1.2.2 — 2025-05-07
- 1.2.1 — 2025-05-07
- 1.2.0 — 2025-01-31
- 1.1.0 — 2025-01-28
- 1.0.2 — 2025-01-27
- 1.0.1 — 2025-01-27
- … 1 more at https://npm.io/package/ya-open-api-types/versions

## README

[//]: # ( )
[//]: # (This file is automatically generated by a `metapak`)
[//]: # (module. Do not change it  except between the)
[//]: # (`content:start/end` flags, your changes would)
[//]: # (be overridden.)
[//]: # ( )
# ya-open-api-types
> TypeScript types for OpenAPI 3.2

[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/nfroidure/ya-open-api-types/blob/main/LICENSE)


[//]: # (::contents:start)

OpenAPI 3.2 types for TypeScript with a focus on making it customizable and to
reuse some types definitions parts (all sub types defined are exported).

The JSON schema definition is parametrized so that you can use your own
definitions and extensions :

```ts
import { type JsonValue } from 'type-fest';
import { type ExpressiveJSONSchema } from 'ya-json-schema-types';
import { type OpenAPI } from './index.js';

const myOpenAPI: OpenAPI<
  ExpressiveJSONSchema,
  {
    'x-my-extension': ('plop' | 'plip')[];
  }
> = {
  openapi: '3.2',
  info: {
    'x-my-extension': 'plop',
    title: 'Test',
    version: '0.0.0',
  },
  paths: {},
};
```

The package also provides a few helpers to deal with OpenAPI/JSONSchemas
references (only local file anchored references are supported).

[//]: # (::contents:end)

# Authors
- [Nicolas Froidure](http://insertafter.com/en/index.html)

# License
[MIT](https://github.com/nfroidure/ya-open-api-types/blob/main/LICENSE)

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