Skip to content

Response headers are not visible on swagger UI #10377

@SuhaniArora

Description

@SuhaniArora

Q&A (please complete the following information)

  • OS: Windows 11
  • Browser: chrome
  • Version: 134.0.6998.89
  • Method of installation: https://editor.swagger.io/
  • Swagger-UI version: N/A
  • Swagger/OpenAPI version: OpenAPI 3.0.1

Content & configuration

I have defined a header in the response section in the following way:

responses:
      "202":
          description: Accepted
          headers:
            x-resource-id:
              description: Job objects status Id
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object

If I open the network tab, I can see the below response headers:

HTTP/1.1 202 Accepted
Server: awselb/2.0
Date: Wed, 19 Mar 2025 14:06:43 GMT
Content-Type: application/json
Content-Length: 0
Connection: keep-alive
Access-Control-Max-Age: 86400
Access-Control-Allow-Methods: OPTIONS, POST, GET, PUT, DELETE
Access-Control-Allow-Headers: *
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: *
x-resource-id: 1165

But on the swagger UI I can only see the below headers:

Image

Describe the bug you're encountering

Described above

Expected behavior

The headers should be shown in response section

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions