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
docs: Fix README inaccuracies on parser selection and form value types
- Selection is by the full media type (type/subtype), not the RFC
9110 subtype. Note that lookup is case-insensitive.
- After coercion, form list values are not strictly List<String> —
an integer-array property yields List<Long>, etc. Describe the
pre- and post-coercion shape correctly.
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -102,12 +102,12 @@ The rest is identical.
102
102
103
103
### Request body content types
104
104
105
-
The server reads `requestBody.content` from the spec and selects a parser by `Content-Type` subtype:
105
+
The server reads `requestBody.content` from the spec and selects a parser by the request's media type (the bare `type/subtype` from `Content-Type`, e.g. `application/json`; lookup is case-insensitive):
|`application/json`| Caller-supplied `JsonMapper`| No — strict against the schema |
110
-
|`application/x-www-form-urlencoded`| Built-in. `Map<String, Object>` (string or `List<String>` for repeated keys)| Yes — field values coerced to the property schema type (integer / number / boolean / array of those) |
110
+
|`application/x-www-form-urlencoded`| Built-in. `Map<String, Object>`. A single value is a `String`; repeated keys produce a `List`. After coercion the element type tracks the schema (e.g. an `integer` array yields `List<Long>`).| Yes — field values coerced to the property schema type (integer / number / boolean / array of those) |
111
111
|`text/plain`| Built-in. Decoded `String`| No — schema should be `type: string`|
112
112
113
113
Form-field coercion mirrors the rules already used at the parameter boundary: the wire is string-only by definition, so a property typed as `integer` accepts `"42"` and yields `42`. Coercion failures surface as RFC-7807 `400` responses with a JSON-pointer to the failing field.
0 commit comments