File schema object properties in openAPI

Viewed 49

How do i define an openAPI schema for a file? I understand that it is an object but I don't know how to define it so that the person reading the document will understand that the given request contains file in a given key.

This is my current progress but I think it is completely wrong.

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

Could someone make a schema for me?
PS: I am using v3.1.0 of openAPI

Thanks!!

0 Answers
Related