OpenAPITools / OpenAPITools/openapi-generator

[REQ][typescript-axios] Add TypeScript 6 to generated package.json peer range

Open Beginner friendly
#24,830 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Is your feature request related to a problem? Please describe.

The typescript-axios generator currently emits this development dependency:

"typescript": "^4.0 || ^5.0"

TypeScript 6 is stable, but generated clients cannot declare compatibility with it. This blocks projects that use the generated package.json from upgrading to TypeScript 6 without maintaining a local template override.

The current template is:
modules/openapi-generator/src/main/resources/typescript-axios/package.mustache

Describe the solution you would like

Update the TypeScript range generated by typescript-axios to include TypeScript 6, for example:

"typescript": "^4.0 || ^5.0 || ^6.0"

Please also run the generated TypeScript-Axios samples using TypeScript 6 to confirm compatibility.

Describe alternatives you have considered

We can maintain a local override of package.mustache, but this duplicates an upstream template and must be kept aligned with every OpenAPI Generator upgrade.

We can also override the generated dependency after code generation, but this does not solve the issue for other TypeScript-Axios users.

Additional context

OpenAPI Generator version: 7.25.0

The generator previously added TypeScript 5 support in #18674:
https://github.com/OpenAPITools/openapi-generator/pull/18674

Our generated client compiles with TypeScript 6. The generated tsconfig.json still contains the deprecated moduleResolution: "node" setting; this remains accepted by TypeScript 6 but will need a separate modernization before TypeScript 7, where that resolver is removed.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Update modules/openapi-generator/src/main/resources/typescript-axios/package.mustache so the generated package.json TypeScript peer range includes ^6.0. Start by inspecting the existing dependency entry, then run the generated TypeScript-Axios samples with TypeScript 6. Done means the generated clients declare the expanded range and compile successfully with TypeScript 6.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
86/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.