github hey-api/openapi-ts @hey-api/openapi-ts@0.57.0

latest releases: @hey-api/openapi-ts@0.84.1, @hey-api/codegen-core@0.2.0, @hey-api/openapi-ts@0.84.0...
10 months ago

Minor Changes

  • #1324 4e62378 Thanks @mrlubos! - feat: rename Hey API plugins

    Renamed @hey-api/services plugin

    This plugin has been renamed to @hey-api/sdk.

    Changed sdk.output value

    To align with the updated name, the @hey-api/sdk plugin will generate an sdk.gen.ts file. This will result in a breaking change if you're importing from services.gen.ts. Please update your imports to reflect this change.

    import { client } from 'client/services.gen'; // [!code --]
    import { client } from 'client/sdk.gen'; // [!code ++]

    Renamed @hey-api/types plugin

    This plugin has been renamed to @hey-api/typescript.

  • #1327 62e37d5 Thanks @mrlubos! - feat: add typescript.exportInlineEnums option

    Added typescript.exportInlineEnums option

    By default, inline enums (enums not defined as reusable components in the input file) will be generated only as inlined union types. You can set exportInlineEnums to true to treat inline enums as reusable components. When true, the exported enums will follow the style defined in enums.

    This is a breaking change since in the previous versions, inline enums were always treated as reusable components. To preserve your current output, set exportInlineEnums to true. This feature works only with the experimental parser.

    export default {
      client: '@hey-api/client-fetch',
      experimentalParser: true,
      input: 'path/to/openapi.json',
      output: 'src/client',
      plugins: [
        // ...other plugins
        {
          exportInlineEnums: true, // [!code ++]
          name: '@hey-api/typescript',
        },
      ],
    };

Patch Changes

Don't miss a new openapi-ts release

NewReleases is sending notifications on new releases.