Skip to content
This repository has been archived by the owner on Jul 2, 2019. It is now read-only.

Support multiple request headers #129

Closed
honzajavorek opened this issue Aug 29, 2017 · 1 comment
Closed

Support multiple request headers #129

honzajavorek opened this issue Aug 29, 2017 · 1 comment

Comments

@honzajavorek
Copy link
Contributor

honzajavorek commented Aug 29, 2017

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: OAI/OpenAPI-Specification#1237

honzajavorek added a commit to apiaryio/dredd-transactions that referenced this issue Aug 29, 2017
Close #9
Related to apiaryio/dredd#356
Related to apiaryio/fury-adapter-swagger#129

BREAKING CHANGE: This changes the structure of Dredd Transactions' output.
Previously, the request and response headers would be provided as an object

    {'Content-Type': {'value': 'application/json'}, ...}

This is now array

    [{'name': 'Content-Type', 'value': 'application/json'}, ...]
honzajavorek added a commit to apiaryio/dredd-transactions that referenced this issue Oct 19, 2017
Close #9
Related to apiaryio/dredd#356
Related to apiaryio/fury-adapter-swagger#129

BREAKING CHANGE: This changes the structure of Dredd Transactions' output.
Previously, the request and response headers would be provided as an object

    {'Content-Type': {'value': 'application/json'}, ...}

This is now array

    [{'name': 'Content-Type', 'value': 'application/json'}, ...]
honzajavorek added a commit to apiaryio/dredd-transactions that referenced this issue Oct 25, 2017
Close #9
Related to apiaryio/dredd#356
Related to apiaryio/fury-adapter-swagger#129

BREAKING CHANGE: This changes the structure of Dredd Transactions' output.
Previously, the request and response headers would be provided as an object

    {'Content-Type': {'value': 'application/json'}, ...}

This is now array

    [{'name': 'Content-Type', 'value': 'application/json'}, ...]
honzajavorek added a commit to apiaryio/dredd-transactions that referenced this issue Nov 13, 2017
Close #9
Related to apiaryio/dredd#356
Related to apiaryio/fury-adapter-swagger#129

BREAKING CHANGE: This changes the structure of Dredd Transactions' output.
Previously, the request and response headers would be provided as an object

    {'Content-Type': {'value': 'application/json'}, ...}

This is now array

    [{'name': 'Content-Type', 'value': 'application/json'}, ...]
@kylef kylef added the bug label Aug 9, 2018
@kylef kylef removed the bug label Jul 2, 2019
@kylef
Copy link
Member

kylef commented Jul 2, 2019

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.

@kylef kylef closed this as completed Jul 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants