elements icon indicating copy to clipboard operation
elements copied to clipboard

Unable to upload file

Open arno-fukuda opened this issue 1 year ago • 1 comments

openapi: 3.0 and openapi: 3.1.0 :

      requestBody:
        required: true
        content:
          application/octet-stream:
            schema:
              type: string
              format: binary

Stoplight: Screenshot 2024-07-23 at 15 06 00

SwaggerUI Screenshot 2024-07-23 at 15 09 24

arno-fukuda avatar Jul 23 '24 06:07 arno-fukuda

This ticket has been labeled jira. A tracking ticket in Stoplight's Jira (PROVCON-2716) has been created.

github-actions[bot] avatar Aug 01 '24 08:08 github-actions[bot]

Any update on this. Endpoints with file uploads are completely untestable with elements as opposed to swagger.

mdgilene avatar Oct 23 '24 17:10 mdgilene

i'm facing the same issue. in stoplight: image in swagger: image but i've read at the documentation there's works well 🤷‍♂️ confusing right image

kuuruni avatar Nov 06 '24 04:11 kuuruni

https://github.com/stoplightio/elements/pull/2737

lukasikp avatar Nov 27 '24 07:11 lukasikp

@lukasikp I think your fix works for application/octet-stream content but it doesn't fix the problem when its multipart/form-data like:

requestBody:
  required: true
  content:
    multipart/form-data:
      schema:
        type: object
        properties:
          image:
            type: string
            format: binary
            title: Image

This is rendered as an upload button in redoc/swagger too: image

MarcSalvat avatar Nov 29 '24 16:11 MarcSalvat