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

Multipart form body is not rendered properly #82

Open
mykola-mokhnach opened this issue Nov 7, 2019 · 1 comment
Open

Multipart form body is not rendered properly #82

mykola-mokhnach opened this issue Nov 7, 2019 · 1 comment

Comments

@mykola-mokhnach
Copy link

Hello,

I am trying to describe the parameters for an API endpoint, which is supposed to serve file uploads. My docstring looks like

    async def handle_upload(self, request: web.Request) -> web.Response:
        """
        ---
        description: This end-point allows to upload files to the storage service.
        tags:
        - Upload
        produces:
        - application/json
        parameters: []
        requestBody:
          required: true
          content:
            multipart/form-data:
              schema:
                type: object
                required:
                  - payload
                properties:
                  payload:
                    type: string
                    format: binary
                    description: the content of the file to be uploaded
                  name:
                    type: string
                    description: the file name (if unset then will be retrieved from `content-disposition` header)
        responses:
          "201":
            description: successful operation

...

Although the generated Swagger document looks like

upload

and does not contain any controls, which would allow file upload.

My question is whether such format supported by the library? Should I, probably, use another approach to describe multipart/form-data content?

@meitham
Copy link

meitham commented Feb 17, 2022

Just checking if there is any update on supporting "Multipart forms" in the library?

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

No branches or pull requests

2 participants