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

Issue ID: v3-semantic-formdata-schema-required

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:

{
    "requestBody": {
        "content": {
            "multipart/form-data": {
            }
        }
    }
}

Remediation

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

{
    "requestBody": {
        "content": {
            "multipart/form-data": {
                "schema": {
                    "properties": {
                        "file": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "format": "binary"
                            }
                        } 
                    }
                }
            }
        }
    }
}