OpenAPITools / OpenAPITools/openapi-generator

[REQ] [Typescript] Only generate types with no services calls

Open
#3,382 5 comments 4 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.

We have a requirement to add cancel tokens to our Axios service calls and have already written this layer. I want to be able to only generate Typescript typings without the axios/fetch service calls (since I would have to write a generator to get cancel token sent to Axios).

Describe the solution you'd like

Option to generate Typescript types only (does this require a new generator type [typescript]?)

Describe alternatives you've considered

I've considered using the following: https://github.com/horiuchi/dtsgenerator, but would rather use OpenApi Generator because of the huge following/support.

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

Start by locating the existing TypeScript generator and the templates or entry points that produce Axios and fetch service calls. Determine how generator options are defined and how typings are currently emitted. Done means a documented option generates TypeScript types without generating service calls, while preserving the existing default behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.