Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG][typescript-fetch] Causing an error GlobalFetch not found #10684

Closed
krupalpatel92 opened this issue Oct 24, 2021 · 2 comments
Closed

[BUG][typescript-fetch] Causing an error GlobalFetch not found #10684

krupalpatel92 opened this issue Oct 24, 2021 · 2 comments

Comments

@krupalpatel92
Copy link

krupalpatel92 commented Oct 24, 2021

Generating OpenAPI with typescript-fetch
npx openapi-generator-cli generate -i ./swagger.json -g typescript-fetch -o ./src/apis

image

Description

"openapi": "3.0.0"

openapi-generator version

image

openapitools.json
image

Steps to reproduce
  1. create-react-app with TypeScript

  2. npx openapi-generator-cli generate -i ./swagger.json -g typescript-fetch -o ./src/apis

  3. yarn start

Solution tried

But didn't worked
image

@krupalpatel92 krupalpatel92 changed the title [BUG][JAVASCRIPT] while use typescript-fetch is causing an error GlobalFetch not found [BUG][typescript-fetch] Causing an error GlobalFetch not found Oct 24, 2021
@DanielRuf
Copy link
Contributor

If anyone stumbles upon this too, you have to add --additional-properties=typescriptThreePlus=true to the CLI command.

@bwaldvogel
Copy link
Contributor

If anyone stumbles upon this too, you have to add --additional-properties=typescriptThreePlus=true to the CLI command.

Looks like this is no longer necessary with version 6.0.0 because of #12123.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants