swagger-ui icon indicating copy to clipboard operation
swagger-ui copied to clipboard

Display Request Headers for OpenAPI 3.0

Open srlintag opened this issue 6 years ago • 3 comments

Are there any plans on implementing to display request headers in the current UI? I see that the last response to issue #1501 was a few years ago and I haven't seen any that specify the new UI lately.

srlintag avatar May 02 '19 18:05 srlintag

What do you mean by this? Do you mean displaying what request headers should be sent with a request to a certain endpoint? If so then you can define them as parameters and then they will display for the route as parameters.

Given this path definition:

  /blah:
    get:
      description: Some description.
      parameters:
        - in: header
          name: X-Api-Key
          schema:
            type: string
            format: uuid
          required: true
          description: API key
      responses:
        ...

Will render this UI: Screen Shot 2019-05-11 at 16 48 08

leggsimon avatar May 11 '19 15:05 leggsimon

Ah no, I mean in the response section, the request headers do not display anymore. Here is an old version with the request headers displaying

swagger2 0

Is there a way to configure this to display on the current UI?

srlintag avatar May 15 '19 12:05 srlintag

感谢,成功解决问题

dddhhhjjj avatar Jul 14 '22 06:07 dddhhhjjj