Skip to content

Releases: Himenon/openapi-typescript-code-generator

v2.0.3

06 May 04:42

Choose a tag to compare

Summary

This release includes critical updates to the release workflow and bumps the minimum Node.js requirement to the current LTS (v24).

Key Improvements

  • Security: Migrated npm release authentication to OIDC (Trusted Publisher).
  • Environment: Aligned the project with Node.js v24 (LTS).
  • Previous Updates (v2.0.0+):
    • Complete removal of TypeScript AST dependency for zero runtime dependencies.
    • Support for Subpath Exports for cleaner import paths.

Breaking Changes & Migration Guide

1. Node.js Version Requirement

The minimum supported Node.js version is now v24.0.0.

- Node.js >= 22.0.0
+ Node.js >= 24.0.0

2. Import Path Changes (from v2.0.0)

Subpath exports are supported. Remove the dist/ prefix.

- import * as Templates from "@himenon/openapi-typescript-code-generator/dist/templates";
+ import * as Templates from "@himenon/openapi-typescript-code-generator/templates";

3. Type Definition & Factory API Changes (from v2.0.0)

  • IntermediateCode is now strictly string.
  • TsGenerator.Factory methods now return string instead of AST nodes.

Other Changes

  • Updated all GitHub Actions workflows to use Node.js 24.x.
  • Fixed checkout logic in release workflows to correctly support tag-based execution.

v2.0.2

06 May 04:23

Choose a tag to compare

Summary

This major release introduces a complete overhaul of the internal architecture to achieve zero runtime dependencies and provides a modern development experience with subpath exports.

Key Improvements

  • Complete Removal of TypeScript AST Dependency: Replaced the TypeScript Compiler API (AST) with a string template-based approach. The typescript package is no longer a runtime dependency.
  • Support for Subpath Exports: Implemented Node.js Subpath Exports for cleaner import paths and better type resolution in modern environments.

Breaking Changes & Migration Guide

1. Import Path Changes

Subpath exports are now supported. You should remove the dist/ prefix from your import paths.

- import * as Templates from "@himenon/openapi-typescript-code-generator/dist/templates";
- import type * as Types from "@himenon/openapi-typescript-code-generator/dist/types";
- import { TsGenerator } from "@himenon/openapi-typescript-code-generator/dist/api";
+ import * as Templates from "@himenon/openapi-typescript-code-generator/templates";
+ import type * as Types from "@himenon/openapi-typescript-code-generator/types";
+ import { TsGenerator } from "@himenon/openapi-typescript-code-generator/api";

2. Type Definition Changes

The IntermediateCode type has been simplified from a union type to a strict string.

- // Old: string | ts.Statement
- const code: Types.CodeGenerator.IntermediateCode = ts.factory.createIdentifier("...");
+ // New: string
+ const code: Types.CodeGenerator.IntermediateCode = "const x = 1;";

3. Internal Factory API Overhaul

The internal TypeScript AST factory wrapper (TsGenerator.Factory) has been replaced with a string-based factory.

const factory = TsGenerator.Factory.create();

- // Old: returns ts.InterfaceDeclaration
- const node = factory.InterfaceDeclaration.create({ ... });
+ // New: returns string
+ const node = factory.InterfaceDeclaration.create({ ... });

Other Changes

  • Consolidated 44 individual factory files into a single optimized entry point.
  • Updated documentation and examples to reflect the new API and paths.
  • Minimum Node.js requirement remains v22.0.0 (as specified in engines).

v2.0.1

06 May 03:44

Choose a tag to compare

Summary

This major release introduces a complete overhaul of the internal architecture to achieve zero runtime dependencies and provides a modern development experience with subpath exports.

Key Improvements

  • Complete Removal of TypeScript AST Dependency: Replaced the TypeScript Compiler API (AST) with a string template-based approach. The typescript package is no longer a runtime dependency.
  • Support for Subpath Exports: Implemented Node.js Subpath Exports for cleaner import paths and better type resolution in modern environments.

Breaking Changes & Migration Guide

1. Import Path Changes

Subpath exports are now supported. You should remove the dist/ prefix from your import paths.

- import * as Templates from "@himenon/openapi-typescript-code-generator/dist/templates";
- import type * as Types from "@himenon/openapi-typescript-code-generator/dist/types";
- import { TsGenerator } from "@himenon/openapi-typescript-code-generator/dist/api";
+ import * as Templates from "@himenon/openapi-typescript-code-generator/templates";
+ import type * as Types from "@himenon/openapi-typescript-code-generator/types";
+ import { TsGenerator } from "@himenon/openapi-typescript-code-generator/api";

2. Type Definition Changes

The IntermediateCode type has been simplified from a union type to a strict string.

- // Old: string | ts.Statement
- const code: Types.CodeGenerator.IntermediateCode = ts.factory.createIdentifier("...");
+ // New: string
+ const code: Types.CodeGenerator.IntermediateCode = "const x = 1;";

3. Internal Factory API Overhaul

The internal TypeScript AST factory wrapper (TsGenerator.Factory) has been replaced with a string-based factory.

const factory = TsGenerator.Factory.create();

- // Old: returns ts.InterfaceDeclaration
- const node = factory.InterfaceDeclaration.create({ ... });
+ // New: returns string
+ const node = factory.InterfaceDeclaration.create({ ... });

Other Changes

  • Consolidated 44 individual factory files into a single optimized entry point.
  • Updated documentation and examples to reflect the new API and paths.
  • Minimum Node.js requirement remains v22.0.0 (as specified in engines).

@himenon/[email protected]

30 Jun 03:17

Choose a tag to compare

What's Changed

  • feat: Fallback to an alternate string if operationId is undefined. by @Himenon in #139

New Features

It now works with the following schema as well.

  /undefined/operation/:id:
    get:
      # operationId: getUndefinedOperation
      responses:
        200:
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Undefined operation response

Full Changelog: https://github.com/Himenon/openapi-typescript-code-generator/compare/@himenon/[email protected]...@himenon/[email protected]

@himenon/[email protected]

19 Jun 05:14

Choose a tag to compare

@himenon/[email protected]

22 Dec 03:12

Choose a tag to compare

@himenon/[email protected]

27 Nov 12:42

Choose a tag to compare

@himenon/[email protected]

04 Mar 06:12

Choose a tag to compare

@himenon/[email protected]

01 Mar 16:14

Choose a tag to compare

What's Changed

  • style: code format by @Himenon in #128
  • fix: path params must not contain any unescaped generic syntax characters by @Himenon in #132

Full Changelog: https://github.com/Himenon/openapi-typescript-code-generator/compare/@himenon/[email protected]...@himenon/[email protected]

@himenon/[email protected]

11 Feb 14:05

Choose a tag to compare