Skip to content

return more accurate type information for non-json requests #2094

@hesxenon

Description

@hesxenon

Description

Similar to #1123 - which has been closed because of the ability to handle this in openapi-fetch as I read it? - I'd like to be able to actually have the request typed properly.

Proposal

E.g. for

requestBody:
  content:
    multipart/form-data:
      schema:
        type: object
        properties:
          image_file:
            type: string
            format: binary

I'd like a generated type like

{image_file: File}

Sorry if I missed a point from the mentioned issue that explains why this would not be preferable in openapi-typescript itself. From my POV it seems like the issue has been closed prematurely as afaik it's not possible to have the correct types without openapi-fetch?

Extra

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestopenapi-tsRelevant to the openapi-typescript library

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions