OpenAPITools / OpenAPITools/openapi-generator
[REQ] add `@ts-nocheck` option for typescript generator
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.
We are using openapi-generator for generating typescript api client.
And we have a strict rule setting in tsconfig for rest of the project.
As mentioned in https://github.com/OpenAPITools/openapi-generator/issues/8961#issuecomment-962473353, https://github.com/OpenAPITools/openapi-generator/issues/1880#issuecomment-891689205 we are also facing to the situation where type-check will fail.
And we need to add // @ts-nocheck to every file which is generated.
Describe the solution you'd like
It would be much better to have an option to generate with // @ts-nocheck in all files.
Describe alternatives you've considered
Nothing else.
Additional context
Since it is auto-generated, it is sometimes redundant to keep these files clean and obey the strict rules.
So it would be nice to have a choice for developers how generated files are treated.
Anyway thanks for maintaining this wonderful tools and this is saving our project to go faster.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the TypeScript generator's option handling and the code paths that assemble generated files. Check how an option can apply the // @ts-nocheck header to every generated file, then verify that generated TypeScript clients include it without changing other generator behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, typescript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100