Releases: hey-api/openapi-ts
@hey-api/[email protected]
Minor Changes
-
#1626
8eba19d
Thanks @mrlubos! - feat: move clients to pluginsClient 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, moveclient
options toplugins
.export default { client: '@hey-api/client-fetch', // [!code --] input: 'path/to/openapi.json', output: 'src/client', plugins: ['@hey-api/client-fetch'], // [!code ++] };
Patch Changes
-
#1626
8eba19d
Thanks @mrlubos! - fix: move sdk.throwOnError option to client.throwOnErrorMoved
sdk.throwOnError
optionThis 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.
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 --] }, ], };
-
#1626
8eba19d
Thanks @mrlubos! - fix: sdks import client from client.gen.ts instead of defining it inside the fileAdded
client.gen.ts
fileThe internal
client
instance previously located insdk.gen.ts
is now defined inclient.gen.ts
. If you're importing it in your code, update the import module.import { client } from 'client/sdk.gen'; // [!code --] import { client } from 'client/client.gen'; // [!code ++]
-
#1626
8eba19d
Thanks @mrlubos! - fix: throw if inferred plugin not found
@hey-api/[email protected]
@hey-api/[email protected]
@hey-api/[email protected]
@hey-api/[email protected]
Patch Changes
-
#1600
0432418
Thanks @mrlubos! - fix: bundle clients from compiled index file -
#1594
bc66cde
Thanks @mrlubos! - fix: generate correct response for text/plain content type -
#1596
4784727
Thanks @mrlubos! - fix: do not use a body serializer on text/plain sdks -
#1602
194f941
Thanks @mrlubos! - fix: support all oauth2 flows in sdk auth -
#1596
4784727
Thanks @mrlubos! - fix: add null to valid bodySerializer types