Skip to content

Commit 1371a93

Browse files
committed
Consolidating form guidance: Media Type Object (3.1.1 port of 3923 3/6)
This puts the useful part of the "An encoding attribute..." text into the fixed fields table, and removes the duplication. It also links the remaining stub or truncated sections to the information's new location under the Encoding Object.
1 parent 9e07940 commit 1371a93

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

versions/3.1.1.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1543,15 +1543,13 @@ See [Working With Examples](#working-with-examples) for further guidance regardi
15431543
##### Fixed Fields
15441544
Field Name | Type | Description
15451545
---|:---:|---
1546-
<a name="mediaTypeSchema"></a>schema | [Schema Object](#schemaObject) | The schema defining the content of the request, response, or parameter.
1546+
<a name="mediaTypeSchema"></a>schema | [Schema Object](#schemaObject) | The schema defining the content of the request, response, parameter, or header.
15471547
<a name="mediaTypeExample"></a>example | Any | Example of the media type; see [Working With Examples](#working-with-examples).
15481548
<a name="mediaTypeExamples"></a>examples | Map[ `string`, [Example Object](#exampleObject) \| [Reference Object](#referenceObject)] | Examples of the media type; see [Working With Examples](#working-with-examples).
1549-
<a name="mediaTypeEncoding"></a>encoding | Map[`string`, [Encoding Object](#encodingObject)] | 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 attribute SHALL only apply to [Request Body Objects](#requestBodyObject), 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.
1549+
<a name="mediaTypeEncoding"></a>encoding | Map[`string`, [Encoding Object](#encodingObject)] | A map between a property name and information providing more control over the serialization of the value. The key, being the property name, MUST exist in the schema as a property. The encoding attribute SHALL only apply to [Request Body Objects](#requestBodyObject), 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.
15501550

15511551
This object MAY be extended with [Specification Extensions](#specificationExtensions).
15521552

1553-
An `encoding` attribute is introduced to give you control over the serialization of parts of `multipart` request bodies. This attribute is _only_ applicable to request bodies, and _only_ for `multipart` and `application/x-www-form-urlencoded` media types.
1554-
15551553
##### Media Type Examples
15561554

15571555
```json
@@ -1657,12 +1655,16 @@ requestBody:
16571655
image/png: {}
16581656
```
16591657

1660-
To upload multiple files, a `multipart` media type MUST be used:
1658+
To upload multiple files, a `multipart` media type MUST be used as shown under [Example: Multipart Form with Multiple Files](#example-multipart-form-with-multiple-files).
16611659

16621660
##### Support for x-www-form-urlencoded Request Bodies
16631661

1662+
See [Encoding the `x-www-form-urlencoded` Media Type](#encoding-the-x-www-form-urlencoded-media-type) for guidance and examples, both with and without the `encoding` attribute.
1663+
16641664
##### Special Considerations for `multipart` Content
16651665

1666+
See [Encoding `multipart` Media Types](#encoding-multipart-media-types) for further guidance and examples, both with and without the `encoding` attribute.
1667+
16661668
#### <a name="encodingObject"></a>Encoding Object
16671669

16681670
A single encoding definition applied to a single schema property.

0 commit comments

Comments
 (0)