Skip to content

Commit cf3e5f3

Browse files
committed
Restore note about contentMediaType
I did not mean to remove this.
1 parent e8cc358 commit cf3e5f3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

versions/3.0.4.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1750,6 +1750,8 @@ Note also that `Content-Transfer-Encoding` is deprecated for `multipart/form-dat
17501750
Using `format: byte` for a multipart field is equivalent to setting `Content-Transfer-Encoding: base64`.
17511751
If `format: byte` is used along with setting a different `Content-Transfer-Encoding` value with the `headers` field, the result is undefined.
17521752

1753+
Per the JSON Schema specification, `contentMediaType` without `contentEncoding` present is treated as if `contentEncoding: identity` were present. While useful for embedding text documents such as `text/html` into JSON strings, it is not useful for a `multipart/form-data` part, as it just causes the document to be treated as `text/plain` instead of its actual media type. Use the Encoding Object without `contentMediaType` if no `contentEncoding` is required.
1754+
17531755
See [Appendix E](#percentEncodingAndFormMediaTypes) for a detailed examination of percent-encoding concerns for form media types.
17541756

17551757
###### Example: Basic Multipart Form

0 commit comments

Comments
 (0)