Media Type Registry

Sequential Multipart: Multipart subtypes with unnamed parts

Media Type(s):

multipart/* (IANA)RFC2045, RFC2046 §5.1
multipart/mixed (IANA)RFC2045, RFC2046 §5.1.3
multipart/alternative (IANA)RFC2045, RFC2046 §5.1.4
multipart/related (IANA)RFC2389, RFC2557
multipart/byteranges (IANA)RFC9110 §14.6

OAS References:

Encoding By Position (Media Type Object)
Encoding multipart Media Types (Encoding Object)

Summary

All multipart media types are based on a common syntax defined by multipart/mixed, and any multipart subtype not explicitly registered is expected to be usable by treating it as multipart/mixed in accordance with RFC2046 §5.1.3.

Remarks

All known multipart subtypes except multipart/form-data are ordered, without any names for the parts. They are either modeled as arrays using schema, or a uniform schema can be applied to each part for streaming purposes using itemSchema (this is particularly relevant to multipart/byteranges). In both cases, itemEncoding can used to manage the media type and headers of each, while if schema is used, prefixEncoding is also available for describing some fixed number of initial parts in a specific order.

The boundary required parameter is common to all multipart subtypes, but does not need to be described explicitly in OpenAPI Descriptions as it is typically generated and used automatically, with a value that is not predictable in advance.

Note that OAS v3.0 claimed support for multipart/mixed, but behaviour was undefined. The claim of support was removed in OAS v3.0.4 and OAS v3.1.1, but can be seen in older patch releases of the 3.0 and 3.1 lines.