···36363737# About
38383939-Hey API's objective is to provide a suite of TypeScript tools to manage API interactions. Whether you're building a front-end application, API-to-API service, or micro-frontends, we want Hey API to be your go-to resource.
4040-4141-Typically, developers of such applications want to:
4242-4343-- use TypeScript interfaces to model data for their APIs
4444-- send and fetch this data from server in a type-safe way
4545-- build further abstractions on top of this data
3939+Hey API is building a suite of TypeScript tools to manage API interactions. Whether you're building a web app, mobile app, or API server, we want to be part of your stack.
46404747-Doing any of these steps manually quickly becomes a huge time sink as your project grows and APIs evolve. Ideally, you want to spend most time on your application. Hey API allows you to do just that.
4141+We aim to do this by offering quality code abstractions necessary to perform type-safe HTTP requests. Attempting to manage this manually quickly becomes a huge time sink as your project grows and APIs evolve. Ideally, you want to spend most time on your application. Hey API allows you to do just that.
48424943We're constantly learning about the ways in which you use our tools. If you have any feedback, please [email us](mailto:lubos@heyapi.dev), [open an issue](https://github.com/hey-api/openapi-ts/issues), or [join a discussion](https://github.com/orgs/hey-api/discussions).
5044
+9-1
docs/contributing.md
···2020- use clear commit messages
2121- be possible to merge automatically
22222323-<!--@include: ./sponsorship.md-->
2323+## Sponsors
2424+2525+You can also contribute by becoming our [sponsor](https://github.com/sponsors/hey-api).
2626+2727+<div class="sponsors-list">
2828+2929+<!--@include: ./sponsors-list.md-->
3030+3131+</div>
···2121- minimal learning curve thanks to extending the underlying technology
2222- support bundling inside the generated output
23232424-## Available Clients
2424+## Options
2525+2626+Hey API natively supports the following clients.
25272628- [Fetch API](/openapi-ts/clients/fetch)
2729- [Axios](/openapi-ts/clients/axios)
2830- [Legacy](/openapi-ts/clients/legacy)
2929-- [Next.js](https://nextjs.org/) <span class="soon">Soon</span>
3131+- [Next.js](https://nextjs.org/) <span data-soon>Soon</span>
30323131-If you'd like Hey API to support your client, let us know by [opening an issue](https://github.com/hey-api/openapi-ts/issues).
3333+Don't see your client? Let us know your interest by [opening an issue](https://github.com/hey-api/openapi-ts/issues).
32343335<!--@include: ../examples.md-->
3436<!--@include: ../sponsorship.md-->
+2-2
docs/openapi-ts/configuration.md
···193193194194## Parser
195195196196-If you're using OpenAPI 3.0 or newer, we encourage you to try out the experimental parser. In the future it will become the default parser, but until it's been tested it's an opt-in feature. To try it out, set the `experimentalParser` flag in your configuration to `true`.
196196+If you're using OpenAPI 3.0 or newer, we encourage you to try out the experimental parser. In the future this will become the default parser, but until it's been tested it's an opt-in feature. To try it out, set the `experimentalParser` flag in your configuration to `true`.
197197198198::: code-group
199199···212212213213:::
214214215215-The experimental parser produces a cleaner output while being faster than the legacy parser. It also supports features such as [Filters](#filters) and more will be added in the future.
215215+The experimental parser produces a cleaner output while being faster than the legacy parser. It also supports features such as [Filters](#filters) and more are being added.
216216217217The legacy parser will be used with the [legacy clients](/openapi-ts/clients/legacy) regardless of the `experimentalParser` flag value. However, it's unlikely to receive any further updates.
218218
+200
docs/openapi-ts/custom-plugin.md
···11+---
22+title: Custom Plugin
33+description: Learn how to create your own Hey API plugin.
44+---
55+66+# Custom Plugin
77+88+::: warning
99+Plugin API is in development. The interface might change before it becomes stable. We encourage you to leave feedback on [GitHub](https://github.com/hey-api/openapi-ts/issues).
1010+:::
1111+1212+You may need to write your own plugin if the available plugins do not suit your needs or you're working on a proprietary use case. This can be easily achieved using the Plugin API. But don't take our word for it – all Hey API plugins are written this way!
1313+1414+## File Structure
1515+1616+We recommend following the design pattern of the native plugins. You can browse the code on [GitHub](https://github.com/hey-api/openapi-ts/tree/main/packages/openapi-ts/src/plugins) as you follow this tutorial. First, create a `my-plugin` folder for your plugin files. Inside, create a barrel file `index.ts` exporting the plugin.
1717+1818+::: code-group
1919+2020+```ts [index.ts]
2121+export { defaultConfig, defineConfig } from './config';
2222+export type { Config } from './types';
2323+```
2424+2525+:::
2626+2727+## TypeScript
2828+2929+`index.ts` references two files, so we need to create them. `types.d.ts` contains the TypeScript interface for your plugin options. It must have the reserved `name` and `output` fields, everything else will become user-configurable options.
3030+3131+::: code-group
3232+3333+```ts [types.d.ts]
3434+export interface Config {
3535+ /**
3636+ * Plugin name. Must be unique.
3737+ */
3838+ name: 'my-plugin';
3939+ /**
4040+ * Name of the generated file.
4141+ *
4242+ * @default 'my-plugin'
4343+ */
4444+ output?: string;
4545+ /**
4646+ * User-configurable option for your plugin.
4747+ *
4848+ * @default false
4949+ */
5050+ myOption?: boolean;
5151+}
5252+```
5353+5454+:::
5555+5656+## Configuration
5757+5858+::: tip
5959+Reserved fields are prefixed with an underscore and are not exposed to the user.
6060+:::
6161+6262+`config.ts` contains the runtime configuration for your plugin. It must implement the `Config` interface we created above and define `_handler()` and `_handlerLegacy()` functions from the `Plugin.Config` interface.
6363+6464+::: code-group
6565+6666+```ts [config.ts]
6767+import type { Plugin } from '@hey-api/openapi-ts';
6868+6969+import { handler } from './plugin';
7070+import type { Config } from './types';
7171+7272+export const defaultConfig: Plugin.Config<Config> = {
7373+ _dependencies: ['@hey-api/typescript'],
7474+ _handler: handler,
7575+ _handlerLegacy: () => {},
7676+ myOption: false, // implements default value from types
7777+ name: 'my-plugin',
7878+ output: 'my-plugin',
7979+};
8080+8181+/**
8282+ * Type helper for `my-plugin` plugin, returns {@link Plugin.Config} object
8383+ */
8484+export const defineConfig: Plugin.DefineConfig<Config> = (config) => ({
8585+ ...defaultConfig,
8686+ ...config,
8787+});
8888+```
8989+9090+:::
9191+9292+In the file above, we define a `my-plugin` plugin which will generate a `my-plugin.gen.ts` file. We also demonstrate declaring `@hey-api/typescript` as a dependency for our plugin, so we can safely import artifacts from `types.gen.ts`.
9393+9494+By default, your plugin output won't be re-exported from the `index.ts` file. To enable this feature, add `exportFromIndex: true` to your `config.ts` file.
9595+9696+::: warning
9797+Re-exporting your plugin from `index.ts` may result in broken output due to naming conflicts. Ensure your exported identifiers are unique.
9898+:::
9999+100100+## Handler
101101+102102+::: warning
103103+To use this feature, you must opt in to the [experimental parser](/openapi-ts/configuration#parser).
104104+:::
105105+106106+Notice we defined `_handler` in our `config.ts` file. This method is responsible for generating the actual output. We recommend implementing it in `plugin.ts`.
107107+108108+::: code-group
109109+110110+```ts [plugin.ts]
111111+import type { Plugin } from '@hey-api/openapi-ts';
112112+113113+import type { Config } from './types';
114114+115115+export const handler: Plugin.Handler<Config> = ({ context, plugin }) => {
116116+ // create an output file. it will not be
117117+ // generated until it contains nodes
118118+ const file = context.createFile({
119119+ id: plugin.name,
120120+ path: plugin.output,
121121+ });
122122+123123+ context.subscribe('before', () => {
124124+ // do something before parsing the input
125125+ });
126126+127127+ context.subscribe('operation', ({ operation }) => {
128128+ // do something with the operation model
129129+ });
130130+131131+ context.subscribe('schema', ({ operation }) => {
132132+ // do something with the schema model
133133+ });
134134+135135+ context.subscribe('after', () => {
136136+ // do something after parsing the input
137137+ });
138138+139139+ // we're using the TypeScript Compiler API
140140+ const stringLiteral = ts.factory.createStringLiteral('Hello, world!');
141141+ const variableDeclaration = ts.factory.createVariableDeclaration(
142142+ 'foo',
143143+ undefined,
144144+ undefined,
145145+ stringLiteral,
146146+ );
147147+ const node = ts.factory.createVariableStatement(
148148+ [ts.factory.createModifier(ts.SyntaxKind.ExportKeyword)],
149149+ ts.factory.createVariableDeclarationList(
150150+ [variableDeclaration],
151151+ ts.NodeFlags.Const,
152152+ ),
153153+ );
154154+155155+ // add a node to our file
156156+ file.add(node);
157157+};
158158+```
159159+160160+:::
161161+162162+### Legacy
163163+164164+Notice we defined `_handlerLegacy` in our `config.ts` file. This method is responsible for generating the actual output when using the legacy parser. We do not recommend implementing this method unless you must use the legacy parser. You can use one of our [`plugin-legacy.ts`](https://github.com/hey-api/openapi-ts/blob/main/packages/openapi-ts/src/plugins/%40hey-api/typescript/plugin-legacy.ts) files as an inspiration for potential implementation.
165165+166166+## Usage
167167+168168+Once we're satisfied with our plugin, we can register it in the [configuration](/openapi-ts/configuration) file.
169169+170170+```js
171171+import { defineConfig } from 'path/to/my-plugin';
172172+173173+export default {
174174+ client: '@hey-api/client-fetch',
175175+ input: 'path/to/openapi.json',
176176+ output: 'src/client',
177177+ plugins: [
178178+ defineConfig({
179179+ myOption: true,
180180+ }),
181181+ ],
182182+};
183183+```
184184+185185+## Output
186186+187187+Putting all of this together will generate the following `my-plugin.gen.ts` file.
188188+189189+::: code-group
190190+191191+```ts [my-plugin.gen.ts]
192192+export const foo = 'Hello, world!';
193193+```
194194+195195+:::
196196+197197+Congratulations! You've successfully created your own plugin! :tada:
198198+199199+<!--@include: ../examples.md-->
200200+<!--@include: ../sponsorship.md-->
···2727To use this feature, you must opt in to the [experimental parser](/openapi-ts/configuration#parser).
2828:::
29293030-Ensure you have already [configured](/openapi-ts/get-started) `@hey-api/openapi-ts`. Update your configuration to use the Fastify plugin.
3030+Assuming you have already created a [configuration](/openapi-ts/get-started) file, simply add `fastify` to your plugins and you'll be ready to generate Fastify artifacts. :tada:
31313232```js
3333import { defaultPlugins } from '@hey-api/openapi-ts';
···4343 ],
4444};
4545```
4646-4747-You can now generate Fastify artifacts. 🎉
48464947## Output
5048···7371fastify.register(glue, { serviceHandlers });
7472```
75737676-<!--@include: ../examples.md-->
7777-<!--@include: ../sponsorship.md-->
7474+<!--@include: ../../examples.md-->
7575+<!--@include: ../../sponsorship.md-->
+1-1
docs/openapi-ts/integrations.md
···33description: Automate your client generation.
44---
5566-# Integrations <span class="soon">Soon</span>
66+# Integrations <span data-soon>Soon</span>
7788::: warning
99GitHub integration is not publicly available yet. We are gathering feedback from beta testers to ensure the final product meets our quality standards. To express your interest in joining the beta test, please open an issue on [GitHub](https://github.com/hey-api/upload-openapi-spec/issues).
+22
docs/openapi-ts/mocks.md
···11+---
22+title: Mocks
33+description: Learn about mocking HTTP servers with @hey-api/openapi-ts.
44+---
55+66+# Mocks
77+88+Realistic mock data is an important component of every robust development process, testing strategy, and product presentation.
99+1010+## Options
1111+1212+Hey API natively supports the following mocking frameworks.
1313+1414+- [Faker](/openapi-ts/plugins/faker) <span data-soon>Soon</span>
1515+- [MSW](/openapi-ts/plugins/msw) <span data-soon>Soon</span>
1616+- [Nock](/openapi-ts/plugins/nock) <span data-soon>Soon</span>
1717+- [Supertest](/openapi-ts/plugins/supertest) <span data-soon>Soon</span>
1818+1919+Don't see your framework? Let us know your interest by [opening an issue](https://github.com/hey-api/openapi-ts/issues).
2020+2121+<!--@include: ../examples.md-->
2222+<!--@include: ../sponsorship.md-->
+32-139
docs/openapi-ts/plugins.md
···5566# Plugins
7788-Every generated file in your output is created by a plugin. You already learned about the default plugins in [Output](/openapi-ts/output). This page contains all native plugins and shows you how to create your own.
88+Every generated file in your output is created by a plugin. You already learned about the default plugins in [Output](/openapi-ts/output). This page contains all native and selected community plugins.
991010## Hey API
11111212-Apart from being responsible for the default output, Hey API plugins are the foundation for other plugins. Instead of creating their own primitives, other plugins can reuse the artifacts from Hey API plugins. This results in smaller output and a better user experience.
1212+Apart from being responsible for the default output, Hey API plugins are the foundation for other plugins. Instead of creating their own primitives, other plugins can reuse the artifacts from Hey API plugins. This results in a smaller output size and a better user experience.
13131414- `@hey-api/schemas` - export OpenAPI definitions as JavaScript objects
1515- `@hey-api/sdk` - robust and polished SDKs
···20202121These plugins help reduce boilerplate associated with third-party dependencies. Hey API natively supports the most popular packages. Please open an issue on [GitHub](https://github.com/hey-api/openapi-ts/issues) if you'd like us to support your favorite package.
22222323-- [`@tanstack/angular-query-experimental`](/openapi-ts/tanstack-query) - TanStack Query functions and query keys
2424-- [`@tanstack/react-query`](/openapi-ts/tanstack-query) - TanStack Query functions and query keys
2525-- [`@tanstack/solid-query`](/openapi-ts/tanstack-query) - TanStack Query functions and query keys
2626-- [`@tanstack/svelte-query`](/openapi-ts/tanstack-query) - TanStack Query functions and query keys
2727-- [`@tanstack/vue-query`](/openapi-ts/tanstack-query) - TanStack Query functions and query keys
2828-- [`fastify`](/openapi-ts/fastify) - TypeScript interface for Fastify route handlers
2929-- [`zod`](/openapi-ts/validators/zod) - Zod schemas to validate your data
2323+- [`@tanstack/angular-query-experimental`](/openapi-ts/plugins/tanstack-query)
2424+- [`@tanstack/react-query`](/openapi-ts/plugins/tanstack-query)
2525+- [`@tanstack/solid-query`](/openapi-ts/plugins/tanstack-query)
2626+- [`@tanstack/svelte-query`](/openapi-ts/plugins/tanstack-query)
2727+- [`@tanstack/vue-query`](/openapi-ts/plugins/tanstack-query)
2828+- [`fastify`](/openapi-ts/plugins/fastify)
2929+- [`zod`](/openapi-ts/plugins/zod)
30303131-## Community
3232-3333-Featured community plugins.
3434-3535-- [add plugin](https://github.com/hey-api/openapi-ts/pulls)
3636-3737-## Custom
3838-3939-::: warning
4040-Plugin API is in development. The interface might change before it becomes stable. We encourage you to leave feedback on [GitHub](https://github.com/hey-api/openapi-ts/issues).
4141-:::
4242-4343-If the existing plugins do not handle your use case or you're working with proprietary packages, you might want to create your own plugin.
4444-4545-### Configuration
4646-4747-We recommend following the design pattern of the native plugins. First, create a `my-plugin` folder for your plugin files. Inside, create a barrel file `index.ts` exporting the plugin's API.
4848-4949-::: code-group
5050-5151-```ts [index.ts]
5252-export { defaultConfig, defineConfig } from './config';
5353-export type { Config } from './types';
5454-```
3131+## Upcoming
55325656-:::
3333+The following plugins are planned but not in development yet. You can help us prioritize them by voting on [GitHub](https://github.com/hey-api/openapi-ts/labels/RSVP%20%F0%9F%91%8D%F0%9F%91%8E).
57345858-`index.ts` references 2 files, so we need to create them. `types.d.ts` contains the TypeScript interface for your plugin's options. It must have the `name` and `output` fields, everything else will become your plugin's configuration options.
3535+- [Ajv](/openapi-ts/plugins/ajv) <span data-soon>Soon</span>
3636+- [Arktype](/openapi-ts/plugins/arktype) <span data-soon>Soon</span>
3737+- [Express](/openapi-ts/plugins/express) <span data-soon>Soon</span>
3838+- [Faker](/openapi-ts/plugins/faker) <span data-soon>Soon</span>
3939+- [Hono](/openapi-ts/plugins/hono) <span data-soon>Soon</span>
4040+- [Joi](/openapi-ts/plugins/joi) <span data-soon>Soon</span>
4141+- [Koa](/openapi-ts/plugins/koa) <span data-soon>Soon</span>
4242+- [MSW](/openapi-ts/plugins/msw) <span data-soon>Soon</span>
4343+- [Nest](/openapi-ts/plugins/nest) <span data-soon>Soon</span>
4444+- [Nock](/openapi-ts/plugins/nock) <span data-soon>Soon</span>
4545+- [Pinia Colada](/openapi-ts/plugins/pinia-colada) <span data-soon>Soon</span>
4646+- [Superstruct](/openapi-ts/plugins/superstruct) <span data-soon>Soon</span>
4747+- [Supertest](/openapi-ts/plugins/supertest) <span data-soon>Soon</span>
4848+- [SWR](/openapi-ts/plugins/swr) <span data-soon>Soon</span>
4949+- [TypeBox](/openapi-ts/plugins/typebox) <span data-soon>Soon</span>
5050+- [Valibot](/openapi-ts/plugins/valibot) <span data-soon>Soon</span>
5151+- [Yup](/openapi-ts/plugins/yup) <span data-soon>Soon</span>
5252+- [Zustand](/openapi-ts/plugins/zustand) <span data-soon>Soon</span>
59536060-::: code-group
5454+## Community
61556262-```ts [types.d.ts]
6363-export interface Config {
6464- /**
6565- * Plugin name. Must be unique.
6666- */
6767- name: 'my-plugin';
6868- /**
6969- * Name of the generated file.
7070- *
7171- * @default 'my-plugin'
7272- */
7373- output?: string;
7474- /**
7575- * A custom option for your plugin.
7676- */
7777- myOption?: boolean;
7878-}
7979-```
5656+Featured community plugins.
80578181-:::
8282-8383-`config.ts` contains the runtime configuration for your plugin. It must implement the `Config` interface from `types.d.ts` and additional plugin metadata defined in the `Plugin.Config` interface.
8484-8585-::: code-group
8686-8787-```ts [config.ts]
8888-import type { Plugin } from '@hey-api/openapi-ts';
8989-9090-import { handler } from './plugin';
9191-import type { Config } from './types';
9292-9393-export const defaultConfig: Plugin.Config<Config> = {
9494- _dependencies: ['@hey-api/typescript'],
9595- _handler: handler,
9696- _handlerLegacy: () => {},
9797- name: 'my-plugin',
9898- output: 'my-plugin',
9999-};
100100-101101-/**
102102- * Type helper for `my-plugin` plugin, returns {@link Plugin.Config} object
103103- */
104104-export const defineConfig: Plugin.DefineConfig<Config> = (config) => ({
105105- ...defaultConfig,
106106- ...config,
107107-});
108108-```
109109-110110-:::
111111-112112-In the `config.ts` above, we define a `my-plugin` plugin which will generate a `my-plugin.gen.ts` output file. We also demonstrate declaring `@hey-api/typescript` as a dependency for our plugin, so we can safely import artifacts from `types.gen.ts`.
113113-114114-Lastly, we define the `_handler` method which will be responsible for generating our custom output. We just need to create the remaining `plugin.ts` file.
115115-116116-::: code-group
117117-118118-```ts [plugin.ts]
119119-import type { Plugin } from '@hey-api/openapi-ts';
120120-121121-import type { Config } from './types';
122122-123123-export const handler: Plugin.Handler<Config> = ({ context, plugin }) => {
124124- // create a file for our output
125125- const file = context.createFile({
126126- id: plugin.name,
127127- path: plugin.output,
128128- });
129129-130130- context.subscribe('before', () => {
131131- // do something before parsing the input
132132- });
133133-134134- context.subscribe('operation', ({ operation }) => {
135135- // do something with the operation model
136136- });
137137-138138- context.subscribe('schema', ({ operation }) => {
139139- // do something with the schema model
140140- });
141141-142142- context.subscribe('after', () => {
143143- // do something after parsing the input
144144- });
145145-};
146146-```
147147-148148-:::
149149-150150-And that's it! We can now register our plugin in the Hey API configuration.
151151-152152-```js
153153-import { defineConfig } from './src/my-plugin';
154154-155155-export default {
156156- client: '@hey-api/client-fetch',
157157- input: 'path/to/openapi.json',
158158- output: 'src/client',
159159- plugins: [
160160- defineConfig({
161161- myOption: true,
162162- }),
163163- ],
164164-};
165165-```
5858+- [add plugin](https://github.com/hey-api/openapi-ts/pulls)
1665916760<!--@include: ../examples.md-->
16861<!--@include: ../sponsorship.md-->
+14
docs/openapi-ts/plugins/ajv.md
···11+---
22+title: Ajv
33+description: Ajv plugin for Hey API. Compatible with all our features.
44+---
55+66+# Ajv <span data-soon>soon</span>
77+88+::: warning
99+This feature isn't in development yet. Help us prioritize it by voting on [GitHub](https://github.com/hey-api/openapi-ts/issues/1476).
1010+:::
1111+1212+[Ajv](https://ajv.js.org/) is the fastest JSON validator for Node.js and browser.
1313+1414+<!--@include: ../../sponsorship.md-->
+14
docs/openapi-ts/plugins/arktype.md
···11+---
22+title: Arktype
33+description: Arktype plugin for Hey API. Compatible with all our features.
44+---
55+66+# Arktype <span data-soon>soon</span>
77+88+::: warning
99+This feature isn't in development yet. Help us prioritize it by voting on [GitHub](https://github.com/hey-api/openapi-ts/issues/1473).
1010+:::
1111+1212+[Arktype](https://arktype.io/) is a TypeScript's 1:1 validator, optimized from editor to runtime.
1313+1414+<!--@include: ../../sponsorship.md-->
+14
docs/openapi-ts/plugins/express.md
···11+---
22+title: Express
33+description: Express plugin for Hey API. Compatible with all our features.
44+---
55+66+# Express <span data-soon>soon</span>
77+88+::: warning
99+This feature isn't in development yet. Help us prioritize it by voting on [GitHub](https://github.com/hey-api/openapi-ts/issues/1484).
1010+:::
1111+1212+[Express](https://expressjs.com/) is a minimal and flexible Node.js web application framework that provides a robust set of features for web and mobile applications.
1313+1414+<!--@include: ../../sponsorship.md-->
+14
docs/openapi-ts/plugins/faker.md
···11+---
22+title: Faker
33+description: Faker plugin for Hey API. Compatible with all our features.
44+---
55+66+# Faker <span data-soon>soon</span>
77+88+::: warning
99+This feature isn't in development yet. Help us prioritize it by voting on [GitHub](https://github.com/hey-api/openapi-ts/issues/1485).
1010+:::
1111+1212+[Faker](https://fakerjs.dev/) is a popular library that generates fake (but reasonable) data that can be used for things such as unit testing, performance testing, building demos, and working without a completed backend.
1313+1414+<!--@include: ../../sponsorship.md-->
+14
docs/openapi-ts/plugins/hono.md
···11+---
22+title: Hono
33+description: Hono plugin for Hey API. Compatible with all our features.
44+---
55+66+# Hono <span data-soon>soon</span>
77+88+::: warning
99+This feature isn't in development yet. Help us prioritize it by voting on [GitHub](https://github.com/hey-api/openapi-ts/issues/1483).
1010+:::
1111+1212+[Hono](https://hono.dev/) is a small, simple, and ultrafast web framework built on Web Standards. It works on any JavaScript runtime: Cloudflare Workers, Fastly Compute, Deno, Bun, Vercel, Netlify, AWS Lambda, Lambda@Edge, and Node.js.
1313+1414+<!--@include: ../../sponsorship.md-->
+14
docs/openapi-ts/plugins/joi.md
···11+---
22+title: Joi
33+description: Joi plugin for Hey API. Compatible with all our features.
44+---
55+66+# Joi <span data-soon>soon</span>
77+88+::: warning
99+This feature isn't in development yet. Help us prioritize it by voting on [GitHub](https://github.com/hey-api/openapi-ts/issues/1477).
1010+:::
1111+1212+[Joi](https://joi.dev/) is the most powerful schema description language and data validator for JavaScript.
1313+1414+<!--@include: ../../sponsorship.md-->
+14
docs/openapi-ts/plugins/koa.md
···11+---
22+title: Koa
33+description: Koa plugin for Hey API. Compatible with all our features.
44+---
55+66+# Koa <span data-soon>soon</span>
77+88+::: warning
99+This feature isn't in development yet. Help us prioritize it by voting on [GitHub](https://github.com/hey-api/openapi-ts/issues/1482).
1010+:::
1111+1212+[Koa](https://koajs.com/) is a new web framework designed by the team behind Express, which aims to be a smaller, more expressive, and more robust foundation for web applications and APIs.
1313+1414+<!--@include: ../../sponsorship.md-->
+14
docs/openapi-ts/plugins/msw.md
···11+---
22+title: MSW
33+description: MSW plugin for Hey API. Compatible with all our features.
44+---
55+66+# MSW <span data-soon>soon</span>
77+88+::: warning
99+This feature isn't in development yet. Help us prioritize it by voting on [GitHub](https://github.com/hey-api/openapi-ts/issues/1486).
1010+:::
1111+1212+[MSW](https://mswjs.io/) is an API mocking library that allows you to write client-agnostic mocks and reuse them across any frameworks, tools, and environments.
1313+1414+<!--@include: ../../sponsorship.md-->
+14
docs/openapi-ts/plugins/nest.md
···11+---
22+title: Nest
33+description: Nest plugin for Hey API. Compatible with all our features.
44+---
55+66+# Nest <span data-soon>soon</span>
77+88+::: warning
99+This feature isn't in development yet. Help us prioritize it by voting on [GitHub](https://github.com/hey-api/openapi-ts/issues/1481).
1010+:::
1111+1212+[Nest](https://nestjs.com/) is a progressive Node.js framework for building efficient, reliable and scalable server-side applications.
1313+1414+<!--@include: ../../sponsorship.md-->
+14
docs/openapi-ts/plugins/nock.md
···11+---
22+title: Nock
33+description: Nock plugin for Hey API. Compatible with all our features.
44+---
55+66+# Nock <span data-soon>soon</span>
77+88+::: warning
99+This feature isn't in development yet. Help us prioritize it by voting on [GitHub](https://github.com/hey-api/openapi-ts/issues/1487).
1010+:::
1111+1212+[Nock](https://github.com/nock/nock) is an HTTP server mocking and expectations library for Node.js.
1313+1414+<!--@include: ../../sponsorship.md-->
+14
docs/openapi-ts/plugins/pinia-colada.md
···11+---
22+title: Pinia Colada
33+description: Pinia Colada plugin for Hey API. Compatible with all our features.
44+---
55+66+# Pinia Colada <span data-soon>soon</span>
77+88+::: warning
99+This feature isn't in development yet. Help us prioritize it by voting on [GitHub](https://github.com/hey-api/openapi-ts/issues/1242).
1010+:::
1111+1212+[Pinia Colada](https://pinia-colada.esm.dev/) is the data fetching layer for Pinia.
1313+1414+<!--@include: ../../sponsorship.md-->
+14
docs/openapi-ts/plugins/superstruct.md
···11+---
22+title: Superstruct
33+description: Superstruct plugin for Hey API. Compatible with all our features.
44+---
55+66+# Superstruct <span data-soon>soon</span>
77+88+::: warning
99+This feature isn't in development yet. Help us prioritize it by voting on [GitHub](https://github.com/hey-api/openapi-ts/issues/1489).
1010+:::
1111+1212+[Superstruct](https://docs.superstructjs.org/) makes it easy to define interfaces and then validate JavaScript data against them.
1313+1414+<!--@include: ../../sponsorship.md-->
+14
docs/openapi-ts/plugins/supertest.md
···11+---
22+title: Supertest
33+description: Supertest plugin for Hey API. Compatible with all our features.
44+---
55+66+# Supertest <span data-soon>soon</span>
77+88+::: warning
99+This feature isn't in development yet. Help us prioritize it by voting on [GitHub](https://github.com/hey-api/openapi-ts/issues/1488).
1010+:::
1111+1212+[Supertest](https://github.com/ladjs/supertest) is a super-agent driven library for testing node.js HTTP servers using a fluent API.
1313+1414+<!--@include: ../../sponsorship.md-->
+14
docs/openapi-ts/plugins/swr.md
···11+---
22+title: SWR
33+description: SWR plugin for Hey API. Compatible with all our features.
44+---
55+66+# SWR <span data-soon>soon</span>
77+88+::: warning
99+This feature isn't in development yet. Help us prioritize it by voting on [GitHub](https://github.com/hey-api/openapi-ts/issues/1479).
1010+:::
1111+1212+[SWR](https://swr.vercel.app/) is a strategy to first return the data from cache (stale), then send the fetch request (revalidate), and finally come with the up-to-date data.
1313+1414+<!--@include: ../../sponsorship.md-->
+14
docs/openapi-ts/plugins/typebox.md
···11+---
22+title: TypeBox
33+description: TypeBox plugin for Hey API. Compatible with all our features.
44+---
55+66+# TypeBox <span data-soon>soon</span>
77+88+::: warning
99+This feature isn't in development yet. Help us prioritize it by voting on [GitHub](https://github.com/hey-api/openapi-ts/issues/1475).
1010+:::
1111+1212+[TypeBox](https://github.com/sinclairzx81/typebox) is a JSON Schema type builder with static type resolution for TypeScript.
1313+1414+<!--@include: ../../sponsorship.md-->
+14
docs/openapi-ts/plugins/valibot.md
···11+---
22+title: Valibot
33+description: Valibot plugin for Hey API. Compatible with all our features.
44+---
55+66+# Valibot <span data-soon>soon</span>
77+88+::: warning
99+This feature isn't in development yet. Help us prioritize it by voting on [GitHub](https://github.com/hey-api/openapi-ts/issues/1474).
1010+:::
1111+1212+[Valibot](https://valibot.dev/) is the open source schema library for TypeScript with bundle size, type safety and developer experience in mind.
1313+1414+<!--@include: ../../sponsorship.md-->
+14
docs/openapi-ts/plugins/yup.md
···11+---
22+title: Yup
33+description: Yup plugin for Hey API. Compatible with all our features.
44+---
55+66+# Yup <span data-soon>soon</span>
77+88+::: warning
99+This feature isn't in development yet. Help us prioritize it by voting on [GitHub](https://github.com/hey-api/openapi-ts/issues/1478).
1010+:::
1111+1212+[Yup](https://github.com/jquense/yup) is a schema builder for runtime value parsing and validation.
1313+1414+<!--@include: ../../sponsorship.md-->
+14
docs/openapi-ts/plugins/zustand.md
···11+---
22+title: Zustand
33+description: Zustand plugin for Hey API. Compatible with all our features.
44+---
55+66+# Zustand <span data-soon>soon</span>
77+88+::: warning
99+This feature isn't in development yet. Help us prioritize it by voting on [GitHub](https://github.com/hey-api/openapi-ts/issues/1480).
1010+:::
1111+1212+[Zustand](https://zustand-demo.pmnd.rs/) is a small, fast, and scalable bearbones state management solution.
1313+1414+<!--@include: ../../sponsorship.md-->
+22
docs/openapi-ts/state-management.md
···11+---
22+title: State Management
33+description: Learn about handling state with @hey-api/openapi-ts.
44+---
55+66+# State Management
77+88+Any reasonably large application will have to deal with state management at some point. State-related code is often one of the biggest boilerplates in your codebase. Well, at least until you start using our state management plugins.
99+1010+## Options
1111+1212+Hey API natively supports the following state managers.
1313+1414+- [TanStack Query](/openapi-ts/plugins/tanstack-query)
1515+- [Pinia Colada](/openapi-ts/plugins/pinia-colada) <span data-soon>Soon</span>
1616+- [SWR](/openapi-ts/plugins/swr) <span data-soon>Soon</span>
1717+- [Zustand](/openapi-ts/plugins/zustand) <span data-soon>Soon</span>
1818+1919+Don't see your state manager? Let us know your interest by [opening an issue](https://github.com/hey-api/openapi-ts/issues).
2020+2121+<!--@include: ../examples.md-->
2222+<!--@include: ../sponsorship.md-->
···44---
5566<script setup>
77-import { embedProject } from '../embed'
77+import { embedProject } from '../../embed'
88</script>
991010# TanStack Query
···28282929## Installation
30303131-Ensure you have already [configured](/openapi-ts/get-started) `@hey-api/openapi-ts`. Update your configuration to use the TanStack Query plugin.
3131+Assuming you have already created a [configuration](/openapi-ts/get-started) file, simply add TanStack Query to your plugins and you'll be ready to generate TanStack Query artifacts. :tada:
32323333::: code-group
3434···104104105105:::
106106107107-You can now generate TanStack Query artifacts. 🎉
108108-109107## Output
110108111109The TanStack Query plugin will optionally generate the following artifacts, depending on the input specification.
···181179});
182180```
183181184184-<!--@include: ../examples.md-->
185185-<!--@include: ../sponsorship.md-->
182182+<!--@include: ../../examples.md-->
183183+<!--@include: ../../sponsorship.md-->
+3-3
docs/openapi-ts/transformers.md
···27272828If your data isn't being transformed as expected, we encourage you to leave feedback on [GitHub](https://github.com/hey-api/openapi-ts/issues).
29293030-## Configuration
3030+## Installation
31313232-To generate transformers, add `@hey-api/transformers` to your plugins.
3232+Assuming you have already created a [configuration](/openapi-ts/get-started) file, simply add `@hey-api/transformers` to your plugins and you'll be ready to generate transformers. :tada:
33333434```js
3535import { defaultPlugins } from '@hey-api/openapi-ts';
···47474848## SDKs
49495050-To automatically transform response data in your SDKs, set `transformer` to `true`.
5050+To automatically transform response data in your SDKs, set `sdk.transformer` to `true`.
51515252```js
5353import { defaultPlugins } from '@hey-api/openapi-ts';
+13-8
docs/openapi-ts/validators.md
···7788There are times when you cannot blindly trust the server to return the correct data. You might be working on a critical application where any mistakes would be costly, or you're simply dealing with a legacy or undocumented system.
991010-Hey API clients support validating responses so you can rest assured that you're working with the correct data.
1010+Whatever your reason to use validators might be, you can rest assured that you're working with the correct data.
11111212-## Available Validators
1212+## Options
1313+1414+Hey API natively supports the following validators.
13151414-- [Zod](/openapi-ts/validators/zod)
1515-- [Ajv](https://ajv.js.org/) <span class="soon">Soon</span>
1616-- [Joi](https://joi.dev/) <span class="soon">Soon</span>
1717-- [Yup](https://github.com/jquense/yup) <span class="soon">Soon</span>
1616+- [Zod](/openapi-ts/plugins/zod)
1717+- [Ajv](/openapi-ts/plugins/ajv) <span data-soon>Soon</span>
1818+- [Arktype](/openapi-ts/plugins/arktype) <span data-soon>Soon</span>
1919+- [Joi](/openapi-ts/plugins/joi) <span data-soon>Soon</span>
2020+- [TypeBox](/openapi-ts/plugins/typebox) <span data-soon>Soon</span>
2121+- [Valibot](/openapi-ts/plugins/valibot) <span data-soon>Soon</span>
2222+- [Yup](/openapi-ts/plugins/yup) <span data-soon>Soon</span>
18231919-If you'd like Hey API to support your validator, let us know by [opening an issue](https://github.com/hey-api/openapi-ts/issues).
2424+Don't see your validator? Let us know your interest by [opening an issue](https://github.com/hey-api/openapi-ts/issues).
20252126## Installation
22272323-There are two ways to generate validators. If you only need response validation in your SDKs, set `sdk.validator` to the desired value. For a more granular approach, add the validator to your plugins and set `sdk.validator` to `true`.
2828+There are two ways to generate validators. If you only need response validation in your SDKs, set `sdk.validator` to the desired value. For a more granular approach, add your validator to plugins and set `sdk.validator` to `true`.
24292530::: code-group
2631
···66# Zod
7788::: warning
99-Zod plugin is in development. You can follow the updates and provide feedback on [GitHub](https://github.com/hey-api/openapi-ts/issues/876).
99+This feature is in development! :tada: Try it out and provide feedback on [GitHub](https://github.com/hey-api/openapi-ts/issues/876).
1010:::
11111212[Zod](https://zod.dev/) is a TypeScript-first schema validation library with static type inference.
···2626To use this feature, you must opt in to the [experimental parser](/openapi-ts/configuration#parser).
2727:::
28282929-Ensure you have already [configured](/openapi-ts/get-started) `@hey-api/openapi-ts`. Update your configuration to use the Zod plugin.
2929+Assuming you have already created a [configuration](/openapi-ts/get-started) file, simply add `zod` to your plugins and you'll be ready to generate Zod artifacts. :tada:
30303131```js
3232import { defaultPlugins } from '@hey-api/openapi-ts';
···4343};
4444```
45454646-You can now generate Zod artifacts. 🎉
4747-4846## SDKs
49475050-To automatically validate response data in your SDKs, set `validator` to `true`.
4848+To automatically validate response data in your SDKs, set `sdk.validator` to `true`.
51495250```js
5351import { defaultPlugins } from '@hey-api/openapi-ts';
+23
docs/openapi-ts/web-frameworks.md
···11+---
22+title: Web Frameworks
33+description: Learn about generating web framework code with @hey-api/openapi-ts.
44+---
55+66+# Web Frameworks
77+88+There are two approaches to developing APIs: code-first, where you start with the code, or spec-first, where you begin with the specification. If you use the latter, you can ensure your APIs adhere to the specification with our web framework plugins.
99+1010+## Options
1111+1212+Hey API natively supports the following frameworks.
1313+1414+- [Fastify](/openapi-ts/plugins/fastify)
1515+- [Express](/openapi-ts/plugins/express) <span data-soon>Soon</span>
1616+- [Hono](/openapi-ts/plugins/hono) <span data-soon>Soon</span>
1717+- [Koa](/openapi-ts/plugins/koa) <span data-soon>Soon</span>
1818+- [Nest](/openapi-ts/plugins/nest) <span data-soon>Soon</span>
1919+2020+Don't see your framework? Let us know your interest by [opening an issue](https://github.com/hey-api/openapi-ts/issues).
2121+2222+<!--@include: ../examples.md-->
2323+<!--@include: ../sponsorship.md-->