Releases: Himenon/openapi-typescript-code-generator
v2.0.3
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.02. 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)
IntermediateCodeis now strictlystring.TsGenerator.Factorymethods now returnstringinstead 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
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
typescriptpackage 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
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
typescriptpackage 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]
What's Changed
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 responseFull Changelog: https://github.com/Himenon/openapi-typescript-code-generator/compare/@himenon/[email protected]...@himenon/[email protected]
@himenon/[email protected]
What's Changed
Full Changelog: https://github.com/Himenon/openapi-typescript-code-generator/compare/@himenon/[email protected]...@himenon/[email protected]
@himenon/[email protected]
What's Changed
Full Changelog: https://github.com/Himenon/openapi-typescript-code-generator/compare/@himenon/[email protected]...@himenon/[email protected]
@himenon/[email protected]
What's Changed
Full Changelog: https://github.com/Himenon/openapi-typescript-code-generator/compare/@himenon/[email protected]...@himenon/[email protected]
@himenon/[email protected]
What's Changed
Full Changelog: https://github.com/Himenon/openapi-typescript-code-generator/compare/@himenon/[email protected]...@himenon/[email protected]
@himenon/[email protected]
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]
What's Changed
Full Changelog: https://github.com/Himenon/openapi-typescript-code-generator/compare/@himenon/[email protected]...@himenon/[email protected]