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
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.
Copy file name to clipboardExpand all lines: versions/3.1.1.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1543,15 +1543,13 @@ See [Working With Examples](#working-with-examples) for further guidance regardi
1543
1543
##### Fixed Fields
1544
1544
Field Name | Type | Description
1545
1545
---|:---:|---
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.
1547
1547
<a name="mediaTypeExample"></a>example | Any | Example of the media type; see [Working With Examples](#working-with-examples).
1548
1548
<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.
1550
1550
1551
1551
This object MAY be extended with [Specification Extensions](#specificationExtensions).
1552
1552
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
-
1555
1553
##### Media Type Examples
1556
1554
1557
1555
```json
@@ -1657,12 +1655,16 @@ requestBody:
1657
1655
image/png: {}
1658
1656
```
1659
1657
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).
1661
1659
1662
1660
##### Support for x-www-form-urlencoded Request Bodies
1663
1661
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
+
1664
1664
##### Special Considerations for `multipart` Content
1665
1665
1666
+
See [Encoding `multipart` Media Types](#encoding-multipart-media-types) for further guidance and examples, both with and without the `encoding` attribute.
1667
+
1666
1668
#### <a name="encodingObject"></a>Encoding Object
1667
1669
1668
1670
A single encoding definition applied to a single schema property.
0 commit comments