OpenAPITools / OpenAPITools/openapi-generator

TypeScript Fetch Generator

Open
#13,720 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue: Bug
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Bug Report Checklist
  • I have a question about the typescript fetch generator. In the YAML API Definition, i have the following block :
{
                        "name": "file",
                        "in": "formData",
                        "description": "The file",
                        "required": false,
                        "type": "file"
                    }

The generator map the formData with Blob structure :

export interface postResquest {
    file?: Blob;
}

But I have no idea to create a Blob struture. Can you hep me ?

I use NodeJS v18.

Thanks

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 with the TypeScript fetch generator and the generated interface shown in the report; compare the YAML API definition's formData file parameter with Node.js v18 Blob behavior. Done means determining whether the generated Blob mapping is correct and documenting or reproducing the supported way to pass the file.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, openapi, typescript
Domain
api, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.