You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add the Media Type Object and Encoding Object to the Components Object,
and allow a Reference Object anywhere they are allowed.
To ensure that re-usable Objects can be documented clearly, add
a `description` field to both Objects.
Copy file name to clipboardExpand all lines: src/oas.md
+9-5Lines changed: 9 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -627,6 +627,8 @@ All objects defined within the Components Object will have no effect on the API
627
627
| <aname="components-links"></a> links | Map[`string`, [Link Object](#link-object)\|[Reference Object](#reference-object)]| An object to hold reusable [Link Objects](#link-object). |
628
628
| <aname="components-callbacks"></a> callbacks | Map[`string`, [Callback Object](#callback-object)\|[Reference Object](#reference-object)]| An object to hold reusable [Callback Objects](#callback-object). |
629
629
| <aname="components-path-items"></a> pathItems | Map[`string`, [Path Item Object](#path-item-object)]| An object to hold reusable [Path Item Objects](#path-item-object). |
630
+
| <aname="components-media-types"></a> mediaTypes | Map[`string`, [Media Type Objects](#media-type-object)\|[Reference Object](#reference-object)]| An object to hold reusable [Media Type Objects](#media-type-object). |
631
+
| <aname="components-encodings"></a> encodings | Map[`string`, [Encoding Objects](#encoding-object)\|[Reference Object](#reference-object)]| An object to hold reusable [Encoding Objects](#encoding-object). |
630
632
631
633
This object MAY be extended with [Specification Extensions](#specification-extensions).
632
634
@@ -1008,7 +1010,7 @@ For use with `in: "querystring"` and `application/x-www-form-urlencoded`, see [E
1008
1010
1009
1011
| Field Name | Type | Description |
1010
1012
| ---- | :----: | ---- |
1011
-
| <a name="parameter-content"></a>content | Map[`string`, [Media Type Object](#media-type-object)] | A map containing the representations for the parameter. The key is the media type and the value describes it. The map MUST only contain one entry. |
1013
+
| <a name="parameter-content"></a>content | Map[`string`, [Media Type Object](#media-type-object) \| [Reference Object](#reference-object)] | A map containing the representations for the parameter. The key is the media type and the value describes it. The map MUST only contain one entry. |
1012
1014
1013
1015
##### Style Values
1014
1016
@@ -1198,7 +1200,7 @@ Describes a single request body.
1198
1200
| Field Name | Type | Description |
1199
1201
| ---- | :----: | ---- |
1200
1202
| <a name="request-body-description"></a>description | `string` | A brief description of the request body. This could contain examples of use. [CommonMark syntax](https://spec.commonmark.org/) MAY be used for rich text representation. |
1201
-
| <a name="request-body-content"></a>content | Map[`string`, [Media Type Object](#media-type-object)] | **REQUIRED**. The content of the request body. The key is a media type or [media type range](https://www.rfc-editor.org/rfc/rfc9110.html#appendix-A) and the value describes it. The map SHOULD have at least one entry; if it does not, the behavior is implementation-defined. For requests that match multiple keys, only the most specific key is applicable. e.g. `"text/plain"` overrides `"text/*"` |
1203
+
| <a name="request-body-content"></a>content | Map[`string`, [Media Type Object](#media-type-object) \| [Reference Object](#reference-object)] | **REQUIRED**. The content of the request body. The key is a media type or [media type range](https://www.rfc-editor.org/rfc/rfc9110.html#appendix-A) and the value describes it. The map SHOULD have at least one entry; if it does not, the behavior is implementation-defined. For requests that match multiple keys, only the most specific key is applicable. e.g. `"text/plain"` overrides `"text/*"` |
1202
1204
| <a name="request-body-required"></a>required | `boolean` | Determines if the request body is required in the request. Defaults to `false`. |
1203
1205
1204
1206
This object MAY be extended with [Specification Extensions](#specification-extensions).
@@ -1249,11 +1251,12 @@ See [Working With Examples](#working-with-examples) for further guidance regardi
1249
1251
1250
1252
| Field Name | Type | Description |
1251
1253
| ---- | :----: | ---- |
1254
+
| <a name="media-type-description"></a>description | `string` | A brief description of the media type. [CommonMark syntax](https://spec.commonmark.org/) MAY be used for rich text representation. |
1252
1255
| <a name="media-type-schema"></a>schema | [Schema Object](#schema-object) | A schema describing the complete content of the request, response, parameter, or header. |
1253
1256
| <a name="media-type-item-schema"></a>itemSchema | [Schema Object](#schema-object) | A schema describing each item within a [sequential media type](#sequential-media-types). |
1254
1257
| <a name="media-type-example"></a>example | Any | Example of the media type; see [Working With Examples](#working-with-examples). |
1255
1258
| <a name="media-type-examples"></a>examples | Map[ `string`, [Example Object](#example-object) \| [Reference Object](#reference-object)] | Examples of the media type; see [Working With Examples](#working-with-examples). |
1256
-
| <a name="media-type-encoding"></a>encoding | Map[`string`, [Encoding Object](#encoding-object)] | A map between a property name and its encoding information, as defined under [Encoding Usage and Restrictions](#encoding-usage-and-restrictions). The `encoding` field SHALL only apply when the media type is `multipart` or `application/x-www-form-urlencoded`. If no Encoding Object is provided for a property, the behavior is determined by the default values documented for the Encoding Object. |
1259
+
| <a name="media-type-encoding"></a>encoding | Map[`string`, [Encoding Object](#encoding-object) \| [Reference Object](#reference-object)] | A map between a property name and its encoding information, as defined under [Encoding Usage and Restrictions](#encoding-usage-and-restrictions). The `encoding` field SHALL only apply when the media type is `multipart` or `application/x-www-form-urlencoded`. If no Encoding Object is provided for a property, the behavior is determined by the default values documented for the Encoding Object. |
1257
1260
1258
1261
This object MAY be extended with [Specification Extensions](#specification-extensions).
1259
1262
@@ -1639,6 +1642,7 @@ These fields MAY be used either with or without the RFC6570-style serialization
1639
1642
1640
1643
| Field Name | Type | Description |
1641
1644
| ---- | :----: | ---- |
1645
+
| <a name="encoding-description"></a>description | `string` | A brief description of the media type. [CommonMark syntax](https://spec.commonmark.org/) MAY be used for rich text representation. |
1642
1646
| <a name="encoding-content-type"></a>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/*`). Default value depends on the property type as shown in the table below. |
1643
1647
| <a name="encoding-headers"></a>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`. |
1644
1648
@@ -1929,7 +1933,7 @@ Describes a single response from an API operation, including design-time, static
1929
1933
| <a name="response-summary"></a>summary | `string` | A short summary of the meaning of the response. |
1930
1934
| <a name="response-description"></a>description | `string` | A description of the response. [CommonMark syntax](https://spec.commonmark.org/) MAY be used for rich text representation. |
1931
1935
| <a name="response-headers"></a>headers | Map[`string`, [Header Object](#header-object) \| [Reference Object](#reference-object)] | Maps a header name to its definition. [RFC9110](https://www.rfc-editor.org/rfc/rfc9110.html#section-5.1) states header names are case insensitive. If a response header is defined with the name `"Content-Type"`, it SHALL be ignored. |
1932
-
| <a name="response-content"></a>content | Map[`string`, [Media Type Object](#media-type-object)] | A map containing descriptions of potential response payloads. The key is a media type or [media type range](https://www.rfc-editor.org/rfc/rfc9110.html#appendix-A) and the value describes it. For responses that match multiple keys, only the most specific key is applicable. e.g. `"text/plain"` overrides `"text/*"` |
1936
+
| <a name="response-content"></a>content | Map[`string`, [Media Type Object](#media-type-object) \| [Reference Object](#reference-object)] | A map containing descriptions of potential response payloads. The key is a media type or [media type range](https://www.rfc-editor.org/rfc/rfc9110.html#appendix-A) and the value describes it. For responses that match multiple keys, only the most specific key is applicable. e.g. `"text/plain"` overrides `"text/*"` |
1933
1937
| <a name="response-links"></a>links | Map[`string`, [Link Object](#link-object) \| [Reference Object](#reference-object)] | A map of operations links that can be followed from the response. The key of the map is a short name for the link, following the naming constraints of the names for [Component Objects](#components-object). |
1934
1938
1935
1939
This object MAY be extended with [Specification Extensions](#specification-extensions).
@@ -2449,7 +2453,7 @@ Using `content` with a `text/plain` media type is RECOMMENDED for headers where
2449
2453
2450
2454
| Field Name | Type | Description |
2451
2455
| ---- | :----: | ---- |
2452
-
| <aname="header-content"></a>content | Map[`string`, [Media Type Object](#media-type-object)]| A map containing the representations for the header. The key is the media type and the value describes it. The map MUST only contain one entry. |
2456
+
| <aname="header-content"></a>content | Map[`string`, [Media Type Object](#media-type-object)\|[Reference Object](#reference-object)]| A map containing the representations for the header. The key is the media type and the value describes it. The map MUST only contain one entry. |
0 commit comments