Skip to main content

multipart-media-type-for-multi-file-request-body

Overview

This rule belongs to the openapi-v3-standards-validation ruleset and states that:

To upload multiple files, a multipart media type must be used in the request body definition.

PropertyValue
EnabledYes
Maximum SeverityError
MessageCurrent media type is not applicable for multi-file request body definition.
CodeOPENAPI3STANDARDS_V121
TypeValidation
Rule SystemSemantic
Broad CategoryRequest Body
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsopenapi3 openapi standards semantic validation file multipart body request

Suggested Fixes

  • Replace the current request body media type with a multipart media type.
  • If you need support for sending multiple files in the request body, use a multipart media type e.g. multipart/form-data.

For More Information