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

content multipart/form-data is not supported #518

Open
kellpossible opened this issue Jul 7, 2023 · 7 comments
Open

content multipart/form-data is not supported #518

kellpossible opened this issue Jul 7, 2023 · 7 comments

Comments

@kellpossible
Copy link

UnexpectedFormat("unexpected content type: multipart/form-data")
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                image_file:
                  type: string
                  format: binary

https://swagger.io/docs/specification/describing-request-body/multipart-requests/

@kellpossible
Copy link
Author

Looks like the file upload might also be unsupported?
https://swagger.io/docs/specification/describing-request-body/file-upload/

@ahirner
Copy link
Contributor

ahirner commented Oct 20, 2023

file upload

I'm wondering how to represent such strings per default. For large files, one would likely substitute them with some tokio stream and support them in a custom Serializer into reqwest::multipart::Form.

A simple but somewhat bc breaking default for type: string format: binary could be Vec<u8>. Right now such strings generate String fields.

@ahirner
Copy link
Contributor

ahirner commented Oct 20, 2023

FWIW, there is a:

@drahnr: would you mind sharing your opinion how to proceed?

@drahnr
Copy link
Contributor

drahnr commented Oct 20, 2023

#418 is imho showcasing how it could be done, there are a few opinionated choices (read: whatever made my immediate pain go away) which don't generalize well necessarily (see the comments inline).

While I'd like to finish it, I don't have capacity left in 2023 to work on it

@ahirner
Copy link
Contributor

ahirner commented Oct 22, 2023

I'm working on a full solution at #609.
Would appreciate input such as test cases @jayvdb @drahnr.
Maybe a few words from @ahl, if it goes into the right direction.

@PlamenHristov
Copy link

Are there any plans to complete the work from any of the #402, #418 , #466, #609 ?

@bcorey-onshape
Copy link

bcorey-onshape commented Dec 16, 2024

hello, any update on this? Onshape API is unable to be parsed due to this error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants