Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 task
hesxenon opened this issue Jan 8, 2025 · 0 comments
Open
1 task

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

hesxenon opened this issue Jan 8, 2025 · 0 comments
Labels
enhancement New feature or request openapi-ts Relevant to the openapi-typescript library

Comments

@hesxenon
Copy link

hesxenon commented Jan 8, 2025

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

@hesxenon hesxenon added enhancement New feature or request openapi-ts Relevant to the openapi-typescript library labels Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request openapi-ts Relevant to the openapi-typescript library
Projects
None yet
Development

No branches or pull requests

1 participant