这是indexloc提供的服务,不要输入任何密码
Skip to content

Releases: hey-api/openapi-ts

@hey-api/openapi-ts@0.80.1

24 Jul 10:14
9ccd969
Compare
Choose a tag to compare

Patch Changes

@hey-api/openapi-ts@0.80.0

23 Jul 11:11
f2e124a
Compare
Choose a tag to compare

Minor Changes

  • #2341 9954bcf Thanks @mrlubos! - feat(zod): add support for Zod 4 and Zod Mini

    Added Zod 4 and Zod Mini

    This release adds support for Zod 4 and Zod Mini. By default, the zod plugin will generate output for Zod 4. If you want to preserve the previous output for Zod 3 or use Zod Mini, set compatibilityVersion to 3 or mini.

    export default {
      input: 'https://get.heyapi.dev/hey-api/backend',
      output: 'src/client',
      plugins: [
        // ...other plugins
        {
          name: 'zod',
          compatibilityVersion: 3,
        },
      ],
    };
    export default {
      input: 'https://get.heyapi.dev/hey-api/backend',
      output: 'src/client',
      plugins: [
        // ...other plugins
        {
          name: 'zod',
          compatibilityVersion: 'mini',
        },
      ],
    };

@hey-api/openapi-ts@0.79.2

21 Jul 16:34
b9720eb
Compare
Choose a tag to compare

Patch Changes

@hey-api/openapi-ts@0.79.1

20 Jul 18:51
8e1e6c9
Compare
Choose a tag to compare

Patch Changes

@hey-api/openapi-ts@0.79.0

20 Jul 14:04
599e5b6
Compare
Choose a tag to compare

Minor Changes

  • #2284 236550f Thanks @mrlubos! - fix(typescript): removed typescript+namespace enums mode

    Removed typescript+namespace enums mode

    Due to a simpler TypeScript plugin implementation, the typescript+namespace enums mode is no longer necessary. This mode was used in the past to group inline enums under the same namespace. With the latest changes, this behavior is no longer supported. You can either choose to ignore inline enums (default), or use the enums transform (added in v0.78.0) to convert them into reusable components which will get exported as usual.

@hey-api/openapi-ts@0.78.3

09 Jul 16:10
8273845
Compare
Choose a tag to compare

Patch Changes

  • #2290 4a77615 Thanks @btmnk! - fix(client): improve types to pass @total-typescript/ts-reset rules

@hey-api/openapi-ts@0.78.2

07 Jul 01:58
7df6059
Compare
Choose a tag to compare

Patch Changes

  • #2281 565830b Thanks @j-ibarra! - fix(transformers): add transformers option allowing passing custom transform functions

@hey-api/openapi-ts@0.78.1

05 Jul 01:34
9cf1a08
Compare
Choose a tag to compare

Patch Changes

@hey-api/openapi-ts@0.78.0

04 Jul 20:31
dedfeef
Compare
Choose a tag to compare

Minor Changes

  • #2246 a11a8c5 Thanks @mrlubos! - feat(config): add parser options

    Added parser options

    Previously, @hey-api/typescript would generate correct types, but the validator plugins would have to re-implement the same logic or generate schemas that didn't match the generated types.

    Since neither option was ideal, this release adds a dedicated place for parser options. Parser is responsible for preparing the input so plugins can generate more accurate output with less effort.

    You can learn more about configuring parser on the Parser page.

    Moved input options

    The following options were moved to the new parser group.

    • input.filters moved to parser.filters
    • input.pagination moved to parser.pagination
    • input.patch moved to parser.patch
    • input.validate_EXPERIMENTAL moved to parser.validate_EXPERIMENTAL

    Updated typescript options

    The following options were renamed.

    • enumsCase moved to enums.case
    • enumsConstantsIgnoreNull moved to enums.constantsIgnoreNull

    Moved typescript options

    The following options were moved to the new parser group.

    • exportInlineEnums moved to parser.transforms.enums
    • readOnlyWriteOnlyBehavior moved to parser.transforms.readWrite.enabled
    • readableNameBuilder moved to parser.transforms.readWrite.responses.name
    • writableNameBuilder moved to parser.transforms.readWrite.requests.name

    Updated readWrite.responses name

    Additionally, the naming pattern for response schemas has changed from {name}Readable to {name}. This is to prevent your code from breaking by default when using a schema that gets updated with a write-only field.

Patch Changes

@hey-api/openapi-ts@0.77.0

24 Jun 19:50
3a39e0d
Compare
Choose a tag to compare

Minor Changes

  • #2227 4ea6f24 Thanks @mrlubos! - refactor(plugin): add DefinePlugin utility types

    Updated Plugin API

    Please refer to the custom plugin tutorial for the latest guide.

  • #2227 4ea6f24 Thanks @mrlubos! - feat(sdk): update validator option

    Updated sdk.validator option

    Clients can now validate both request and response data. As a result, passing a boolean or string to validator will control both of these options. To preserve the previous behavior, set validator.request to false and validator.response to your previous configuration.

    export default {
      input: 'https://get.heyapi.dev/hey-api/backend',
      output: 'src/client',
      plugins: [
        // ...other plugins
        {
          name: '@hey-api/sdk',
          validator: {
            request: false,
            response: true,
          },
        },
      ],
    };

Patch Changes