|
| 1 | +--- |
| 2 | +owner: handrews |
| 3 | +name: Sequential Multipart |
| 4 | +description: Multipart subtypes with unnamed parts |
| 5 | +media_types: |
| 6 | + - name: multipart/* |
| 7 | + iana: https://www.iana.org/assignments/media-types/media-types.xhtml#multipart |
| 8 | + specifications: |
| 9 | + - name: RFC2045 |
| 10 | + url: https://www.rfc-editor.org/rfc/rfc2045 |
| 11 | + - name: RFC2046 §5.1 |
| 12 | + url: https://www.rfc-editor.org/rfc/rfc2046#section-5.1 |
| 13 | + - name: multipart/mixed |
| 14 | + iana: https://www.iana.org/assignments/media-types/multipart/mixed |
| 15 | + specifications: |
| 16 | + - name: RFC2045 |
| 17 | + url: https://www.rfc-editor.org/rfc/rfc2045 |
| 18 | + - name: RFC2046 §5.1.3 |
| 19 | + url: https://www.rfc-editor.org/rfc/rfc2046#section-5.1.3 |
| 20 | + - name: multipart/alternative |
| 21 | + iana: https://www.iana.org/assignments/media-types/multipart/alternative |
| 22 | + specifications: |
| 23 | + - name: RFC2045 |
| 24 | + url: https://www.rfc-editor.org/rfc/rfc2045 |
| 25 | + - name: RFC2046 §5.1.4 |
| 26 | + url: https://www.rfc-editor.org/rfc/rfc2046#section-5.1.4 |
| 27 | + - name: multipart/related |
| 28 | + iana: https://www.iana.org/assignments/media-types/multipart/related |
| 29 | + specifications: |
| 30 | + - name: RFC2389 |
| 31 | + url: https://www.rfc-editor.org/rfc/rfc2389 |
| 32 | + - name: RFC2557 |
| 33 | + url: https://www.rfc-editor.org/rfc/rfc2557 |
| 34 | + - name: multipart/byteranges |
| 35 | + iana: https://www.iana.org/assignments/media-types/multipart/byteranges |
| 36 | + specifications: |
| 37 | + - name: RFC9110 §14.6 |
| 38 | + url: https://www.rfc-editor.org/rfc/rfc9110#name-media-type-multipart-bytera |
| 39 | +references: |
| 40 | + - section: Encoding By Position |
| 41 | + anchor: encoding-by-position |
| 42 | + parentObject: Media Type Object |
| 43 | + parentAnchor: media-type-object |
| 44 | + - section: Encoding `multipart` Media Types |
| 45 | + anchor: encoding-multipart-media-types |
| 46 | + parentObject: Encoding Object |
| 47 | + parentAnchor: encoding-object |
| 48 | +layout: default |
| 49 | +--- |
| 50 | + |
| 51 | +{% capture summary %} |
| 52 | +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](https://www.rfc-editor.org/rfc/rfc2046.html#section-5.1.3). |
| 53 | +{% endcapture %} |
| 54 | + |
| 55 | +{% capture remarks %} |
| 56 | +All known `multipart` subtypes except `multipart/form-data` are ordered, without any names for the parts. |
| 57 | +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`). |
| 58 | +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. |
| 59 | + |
| 60 | +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. |
| 61 | + |
| 62 | +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. |
| 63 | +{% endcapture %} |
| 64 | + |
| 65 | +{% include media-type-entry.md summary=summary remarks=remarks %} |
| 66 | + |
0 commit comments