Replies: 4 comments 2 replies
-
@jdegre great question, and perhaps we need to provide a clearer explanation in the spec. If you look at https://spec.openapis.org/oas/v3.0.3#support-for-x-www-form-urlencoded-request-bodies you'll see it says:
So basically, if |
Beta Was this translation helpful? Give feedback.
-
@jdegre Your example show an interesting case where a In your example, for the interior @webron Can you clarify the intention of OAS for the serialization of interior composite values? |
Beta Was this translation helpful? Give feedback.
-
See PR #3719 for the clarification. |
Beta Was this translation helpful? Give feedback.
-
The PR has been merged for 3.0.4, and PRs porting the fix to 3.1.1 and 3.2.0 are open and expected to be merged, so I'm declaring this resolved. |
Beta Was this translation helpful? Give feedback.
-
Hi,
A, hopefully, straightforward question on the correct interpretation of the OpenAPI spec.
Regarding the
x-www-form-urlencoded
encoding of request bodies, such as this example:How is the
foo
array supposed to be encoded in the request body? As an exploded array?, such as:or not exploded? such as:
I'm aware that the explode behavior can be explicitly indicated by adding an
encoding
section withstyle: form
andexplode: true/false
, but I cannot find in the OpenAPI spec a clear indication of what is the expected behavior when the encoding section is NOT provided.Out of curiosity, I have tried with Swagger UI and it follows the non-exploded approach (2nd example), but please note that this is not a question about Swagger UI or any other tool. I'm interested in the correct interpretation of the OpenAPI spec.
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions