Skip to content

Commit 35dc935

Browse files
committed
Clarify the rationale for the encoding field
The oddities of its media type support derive from its history as the OAS implementation of web forms.
1 parent bb0a4ca commit 35dc935

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
@@ -1628,7 +1628,7 @@ To use the `encoding` field, a `schema` MUST exist, and the `encoding` field's
16281628
Array properties MUST be handled by applying the given Encoding Object to multiple parts (or query parameters) with the same `name`, as is recommended by [RFC7578](https://www.rfc-editor.org/rfc/rfc7578.html#section-4.3) for supplying multiple values per form field.
16291629
For all other property types, including array values within a top-level array, the Encoding Object MUST be applied to the entire value.
16301630

1631-
The behavior of the `encoding` field is only defined for media types structured as name-value pairs that allow repeat values.
1631+
The behavior of the `encoding` field is designed to support web forms, and is therefore only defined for media types structured as name-value pairs that allow repeat values.
16321632
The order of these name-value pairs in the target media type is implementation-defined.
16331633

16341634
For `application/x-www-form-urlencoded`, the encoding keys MUST map to parameter names, with the values produced according to the rules of the [Encoding Object](#encoding-object).

0 commit comments

Comments
 (0)