Skip to content

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

Closed

Description

@krupalpatel92

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

Activity

  1. 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[/+] on Oct 24, 2021
  2. DanielRuf commented on Nov 18, 2021

    @DanielRuf
    Contributor

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

  3. bwaldvogel commented on May 30, 2022

    @bwaldvogel
    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions