Media type object with 'multipart/form-data' has no schema defined

Description

One or more media type objects in your API where Content-Type is set to multipart/form-data do not have schemas defined. Schema is required when Content-Type is multipart/form-data.

For more details, see the OpenAPI Specification.

Example

The following is an example of how this issue could look in your API definition. This request body would accept anything as input:

1requestBody:
2  content:
3    multipart/form-data: {}
4

Remediation

Make sure that you have defined schemas for all media type objects in your API.

1requestBody:
2  content:
3    multipart/form-data:
4      schema:
5        properties:
6          file:
7            type: array
8            items:
9              type: string
10              format: binary
11

Copyright 42Crunch 2021