Skip to content

Releases: hey-api/openapi-ts

@hey-api/[email protected]

27 Jan 21:17
c928e80
Compare
Choose a tag to compare

Minor Changes

  • #1626 8eba19d Thanks @mrlubos! - feat: 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.

    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.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.

    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 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.

    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]

27 Jan 21:16
c928e80
Compare
Choose a tag to compare

Patch Changes

@hey-api/[email protected]

27 Jan 21:16
c928e80
Compare
Choose a tag to compare

Patch Changes

@hey-api/[email protected]

27 Jan 21:16
c928e80
Compare
Choose a tag to compare

Patch Changes

@hey-api/[email protected]

21 Jan 07:50
ea24bca
Compare
Choose a tag to compare

Patch Changes

@hey-api/[email protected]

21 Jan 07:50
ea24bca
Compare
Choose a tag to compare

Patch Changes

@hey-api/[email protected]

21 Jan 07:50
ea24bca
Compare
Choose a tag to compare

Patch Changes

@hey-api/[email protected]

21 Jan 07:50
ea24bca
Compare
Choose a tag to compare

Patch Changes

@hey-api/[email protected]

20 Jan 16:44
b463bbf
Compare
Choose a tag to compare

Patch Changes

@hey-api/[email protected]

20 Jan 16:44
b463bbf
Compare
Choose a tag to compare

Minor Changes