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

missing file object in yaml spec for upload file specs #332

Open
ahdbk opened this issue Apr 17, 2023 · 1 comment
Open

missing file object in yaml spec for upload file specs #332

ahdbk opened this issue Apr 17, 2023 · 1 comment

Comments

@ahdbk
Copy link

ahdbk commented Apr 17, 2023

In the upload file documentation there is a missing property for the multipart request example

image

      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                orderId:
                  type: integer
                userId:
                  type: integer
                fileName:
                  type: string
+              file:
+                type: string
+                format: binary

Link to the doc:
https://swagger.io/docs/specification/describing-request-body/file-upload/

@char0n
Copy link
Member

char0n commented May 2, 2023

Here is an excerpt from OpenAPI 3.0.3:

image

@frankkilcommins I think @ahdbk is right.

We either have to do this modification:

      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                orderId:
                  type: integer
                userId:
                  type: integer
                fileName:
                  type: string
                  format: binary

or

      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                orderId:
                  type: integer
                userId:
                  type: integer
                fileName:
                  type: string # this property only defines the name of the file, not it's content
                file:
                  type: string
                  format: binary

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