Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #3402
Closed
Open
Issue created Jul 19, 2019 by Administrator@rootContributor5 of 6 checklist items completed5/6 checklist items

[BUG] Typescript-fetch : The `options` parameter is gone. No way to pass options.

Created by: JFCote

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • What's the version of OpenAPI Generator used?
  • Have you search for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Bounty to sponsor the fix (example)
Description

The new version of the typescript-fetch generator seems to have completely dropped the second parameters for each call that provided a way to pass options. For example, specific header or configuration.

As you can see in version 3.3.4 tag, there is always a second parameter to each calls. https://github.com/OpenAPITools/openapi-generator/blob/v3.3.4/modules/openapi-generator/src/main/resources/typescript-fetch/api.mustache#L93

In the current master, there is no such call and I don't see any way to pass this information.

For example, in our application, we were always passing this:

{
    credentials: "include",
    headers: {
        'Cache-Control': 'no-cache, no-store'
    }
}

Is there another way to achieve the same thing using the new generator or should I create a new PR to add back this functionality?

openapi-generator version

4.X.X (master)

OpenAPI declaration file content or url

Any spec

Command line used for generation

Any typescript-fetch generation

Steps to reproduce

Generate a typescript-fetch client and notice the issue

Related issues/PRs

Didn't find anything related to this

Suggest a fix

Add the functionality back (have a second parameter everywhere)

Assignee
Assign to
Time tracking