@hey-api/openapi-ts
0.99.0 · 22 Jun 2026MIT8.3M / weekRepositoryHomepagenpmAtom feed
Your version
0.99.0 is the newest release of 0.63.x.
In short
1 new3 fixed
Security
1 advisory affects 0.63.0; 0.97.3 fixes them
- Moderate@hey-api/openapi-ts's `buildClientParams` template: prototype chain substitution via unknown `$<slot>___proto__` keyGHSA-hhx9-57xq-r5rw · 1 Jul 2026Fixed in 0.97.3
Release note
Minor Changes
Move clients to plugins
Client plugins
Clients are now plugins generating their own `client.gen.ts` file. There's no migration needed if you're using CLI. If you're using the configuration file, move `client` options to `plugins`.
```js
export default {
client: '@hey-api/client-fetch', // [!code --]
input: 'path/to/openapi.json',
output: 'src/client',
plugins: ['@hey-api/client-fetch'], // [!code ++]
};
```Patch Changes
Move sdk.throwOnError option to client.throwOnError
Moved sdk.throwOnError option
This SDK configuration option has been moved to the client plugins where applicable. Not every client can be configured to throw on error, so it didn't make sense to expose the option when it didn't have any effect.
```js
export default {
input: 'path/to/openapi.json',
output: 'src/client',
plugins: [
{
name: '@hey-api/client-fetch',
throwOnError: true, // [!code ++]
},
{
name: '@hey-api/sdk',
throwOnError: true, // [!code --]
},
],
};
```Sdks import client from client.gen.ts instead of defining it inside the file
Added client.gen.ts file
The internal `client` instance previously located in `sdk.gen.ts` is now defined in `client.gen.ts`. If you're importing it in your code, update the import module.
```js
import { client } from 'client/sdk.gen'; // [!code --]
import { client } from 'client/client.gen'; // [!code ++]
```Throw if inferred plugin not found
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.