Closed honzajavorek closed 5 years ago
There is no support for multiple response headers of the same name in Swagger 2.0, but there is a way how to have multiple request headers of the same name:
paths: /honey: get: parameters: - name: X-Multiple in: header x-example: foo type: string - name: X-Multiple in: header x-example: bar type: string
This syntax returns error though:
Validation failed. /paths/honey/get has duplicate parameters Validation failed. Found multiple header parameters named "X-Multiple"
Related: https://github.com/OAI/OpenAPI-Specification/issues/1237
This is not permitted in the OpenAPI 2 spec:
The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a name and location.
You may do type: array though.
type: array
There is no support for multiple response headers of the same name in Swagger 2.0, but there is a way how to have multiple request headers of the same name:
This syntax returns error though:
Related: https://github.com/OAI/OpenAPI-Specification/issues/1237