Skip to content

Commit 4ad28b5

Browse files
committed
Allow the Encoding Object in all locations
There is no reason to restrict use of the `encoding` field of the Media Type Object to Request Body Objects only. Not only does this exclude legitimate use cases of returning multipart content (particularly as we fix the support for `multipart/mixed`), it also complicates implementation by requiring the handlingn of the Media Type Object to be context-aware. This is a rare change that both simplifies implementation and adds functionality.
1 parent 1fccd24 commit 4ad28b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/oas.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1615,7 +1615,7 @@ See [Working With Examples](#working-with-examples) for further guidance regardi
16151615
| <a name="media-type-schema"></a>schema | [Schema Object](#schema-object) | The schema defining the content of the request, response, parameter, or header. |
16161616
| <a name="media-type-example"></a>example | Any | Example of the media type; see [Working With Examples](#working-with-examples). |
16171617
| <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). |
1618-
| <a name="media-type-encoding"></a>encoding | Map[`string`, [Encoding Object](#encoding-object)] | A map between a property name and its encoding information. The key, being the property name, MUST exist in the schema as a property. The `encoding` field SHALL only apply to [Request Body Objects](#request-body-object), and only 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. |
1618+
| <a name="media-type-encoding"></a>encoding | Map[`string`, [Encoding Object](#encoding-object)] | A map between a property name and its encoding information. The key, being the property name, MUST exist in the schema as a property. 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. |
16191619

16201620
This object MAY be extended with [Specification Extensions](#specification-extensions).
16211621

0 commit comments

Comments
 (0)