-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Description
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:
requestBody:
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
foo:
type: array
items:
type: object
properties:
a:
type: integer
b:
type: integer
How is the foo array supposed to be encoded in the request body? As an exploded array?, such as:
foo={"a":1,"b":2}&foo={"a":3,"b":4}
or not exploded? such as:
foo={"a":1,"b":2},{"a":3,"b":4}
I'm aware that the explode behavior can be explicitly indicated by adding an encoding section with style: form and explode: 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!