From 8f12af7b2cabf8cd5d2342c1f64d2f7877c13205 Mon Sep 17 00:00:00 2001 From: Karen Etheridge Date: Tue, 12 May 2026 12:44:26 -0700 Subject: [PATCH] include an ABNF for contentType closes #4788 --- src/oas.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/oas.md b/src/oas.md index c750e73cf2..ff5c5b2744 100644 --- a/src/oas.md +++ b/src/oas.md @@ -1715,7 +1715,7 @@ These fields MAY be used either with or without the RFC6570-style serialization | Field Name | Type | Description | | ---- | :----: | ---- | -| contentType | `string` | The `Content-Type` for encoding a specific property. The value is a comma-separated list, each element of which is either a specific media type (e.g. `image/png`) or a wildcard media type (e.g. `image/*`). The default value depends on the type as shown in the table below. | +| contentType | `string` | The `Content-Type` for encoding a specific property. The value is a comma-separated list, each element of which is either a specific media type (e.g. `image/png`) or a [media type range](https://www.rfc-editor.org/rfc/rfc9110.html#appendix-A) (e.g. `image/*`). The default value depends on the type as shown in the table below. | | headers | Map[`string`, [Header Object](#header-object) \| [Reference Object](#reference-object)] | A map allowing additional information to be provided as headers. `Content-Type` is described separately and SHALL be ignored in this section. This field SHALL be ignored if the media type is not a `multipart`. | | encoding | Map[`string`, [Encoding Object](#encoding-object)] | Applies nested Encoding Objects in the same manner as the [Media Type Object](#media-type-object)'s `encoding` field. | | prefixEncoding | [[Encoding Object](#encoding-object)] | Applies nested Encoding Objects in the same manner as the [Media Type Object](#media-type-object)'s `prefixEncoding` field. | @@ -1741,6 +1741,14 @@ Determining how to handle a `type` value of `null` depends on how `null` values If `null` values are entirely omitted, then the `contentType` is irrelevant. See [Appendix B](#appendix-b-data-type-conversion) for a discussion of data type conversion options. +The contentType field is defined by the following [ABNF](https://tools.ietf.org/html/rfc5234) syntax: + +```abnf +encoding-content-type = media-range *( "," OWS media-range ) +``` + +Here, media-range and OWS are taken from [[RFC9110]]. + ##### Fixed Fields for RFC6570-style Serialization | Field Name | Type | Description |