You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
When we create types through the openapi-generator-cli, the generated TypeScript files contains some unused imports and arguments. Among these are import { mapValues } from '../runtime'; at the top of each file, and ignoreDiscriminator as an unused argument to each ...FromJSONTyped function.
These unused imports and arguments become an issue when we try to build our app and do type checking through tsc. Since these files are imported throughout our app to use the types, there is no way to exclude them from type checking externally.
Is there any way to prevent the type generator to generate files with unused imports and arguments, or could the generated files perhaps be annotated with // @ts-nocheck at the top of the file to exclude them from the tsc type checker?
openapi-generator version
2.17.0
Suggest a fix
The issue can be fixed if the generated output-files could be annotated with // @ts-nocheck at the top of each file.
The text was updated successfully, but these errors were encountered:
Bug Report Checklist
Description
When we create types through the openapi-generator-cli, the generated TypeScript files contains some unused imports and arguments. Among these are
import { mapValues } from '../runtime';
at the top of each file, andignoreDiscriminator
as an unused argument to each...FromJSONTyped
function.These unused imports and arguments become an issue when we try to build our app and do type checking through
tsc
. Since these files are imported throughout our app to use the types, there is no way to exclude them from type checking externally.Is there any way to prevent the type generator to generate files with unused imports and arguments, or could the generated files perhaps be annotated with
// @ts-nocheck
at the top of the file to exclude them from thetsc
type checker?openapi-generator version
2.17.0
Suggest a fix
The issue can be fixed if the generated output-files could be annotated with
// @ts-nocheck
at the top of each file.The text was updated successfully, but these errors were encountered: