OpenAPITools / OpenAPITools/openapi-generator

[REQ][TypeScript Fetch] Default 3.6+ configuration to true

Open
#9,973 0 comments 16 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement: Feature
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.

When I tried out the TypeScript fetch client generator, I got an error when viewing the generated code that GlobalFetch was not defined. GlobalFetch was removed in TypeScript 3.6.2. To fix this I had to change the configuration "typescriptThreePlus": true since it currently defaults to false. However the false default was set 2 years ago so it seems like a good time to revisit that.

Describe the solution you'd like

Update the typescriptThreePlus default to true since most users will be on something past TypeScript 3.6.2 at this point, and the defaults should work out of the box for most users.

Describe alternatives you've considered

There could just be extra documentation that clarifies the default, but that would likely be catering to a minority of new users at this point.

Additional context

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

Search the TypeScript fetch client generator for typescriptThreePlus and inspect where its default is defined. Change the default to true, then verify that generated output no longer references the removed GlobalFetch for TypeScript 3.6.2 and later.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.