-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Closed
Description
Bug Report Checklist
- Have you provided a full/minimal spec to reproduce the issue?
- Have you validated the input using an OpenAPI validator (example)?
- What's the version of OpenAPI Generator used?
4.1.3 - Have you search for related issues/PRs?
- What's the actual output vs expected output?
Expected: Consumed in typescript with no build errors
Actual:

Description
Generates typescript files (api.ts, etc) with a relative ref to a custom.d.ts file. tsc ignores declaration files—when the compiled output is moved to dist, the custom.d.ts does not come along for the ride and the relative references now point to src/custom.d.ts. This is problematic when the code is distributed to npm and used in another typescript file.
openapi-generator version
4.1.3
Command line used for generation
openapi-generator generate -i dist/spec.json -o src/gen_client -g typescript-axios
Steps to reproduce
- Generate new project with
openapi-generator generate -i dist/spec.json -o src/gen_client -g typescript-axios
Suggest a fix
Generate a custom.ts instead of a custom.d.ts
Upgrade node and/or @types/node and get ride of the custom.d.ts file altogether
Reactions are currently unavailable