-
As long as I understand in HTTP is possible to send duplicated query and header parameters, how the server handle this is out of the scope of the specification but I have observed that the combination of "name" and location (expressed by field "in") in parameters in Open API should be unique so what is the correct way to specify that an API allow multiple query/headers, for example:
Best regards |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
"4.8.12.3 Style Values" section covers how parameters may be represented with different data types (also check out table with examples in "4.8.12.4 Style Examples" section below). It is possible to represent array of query-parameters as you wish with Example: name: color
in: query
style: form
explode: true
schema:
type: array
uniqueItems: true
items:
enum: [blue, black, brown]
However, OpenAPI specification does not cover multiple headers with same name, so behaviour is undefined 😔 But it's nice idea to visit "Big thoughts for 4.0" discussion where we gather ideas for the next major update of the spec and suggest yours about headers with attached references to HTTP spec, existing issues and discussions if they exist. |
Beta Was this translation helpful? Give feedback.
-
Looks like this was resolved, closing. |
Beta Was this translation helpful? Give feedback.
"4.8.12.3 Style Values" section covers how parameters may be represented with different data types (also check out table with examples in "4.8.12.4 Style Examples" section below). It is possible to represent array of query-parameters as you wish with
style: form
,explode: true
and using schema of typearray
inschema
keyword.Example:
However, OpenAPI specification does not cover multiple headers with same name, so behaviour is undefined 😔 But it's nice idea to visit "Big thoughts for 4.0" discussion where we gather ideas for…