OpenAPITools / OpenAPITools/openapi-generator

[BUG] import statement is missing in "typescript-node" generator

Open
#12,451 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Bug Report Checklist
Description

I am trying to generate "typescript-node" and one of the file generated is missing import statement , I have to add import manually then its working fine.

openapi-generator version
OpenAPI declaration file content or url
Generation Details

openapi-generator-cli generate -i docs/api.yaml -g typescript-node -o src/generated

Steps to reproduce

this generates a file under models folder "RegistryDto.ts" which misses an import statement

Related issues/PRs
Suggest a fix

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

Start by reproducing the issue with the provided OpenAPI declaration using the typescript-node generator and inspect the generated output for the missing import. The issue does not name a generator file or test, so locate the relevant generator templates and existing tests before changing anything. Done means the generated TypeScript output includes the required import and works without manual edits.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, openapi, typescript
Domain
devtools, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.