Skip to content

Response Body not shown when Content-Type in the response header is not set #6149

Open
@vinaylondhe-highspot

Description

@vinaylondhe-highspot

Q&A (please complete the following information)

  • OS: macOS
  • Browser: chrome
  • Method of installation: dist
  • Swagger-UI version: 3.26.2
  • Swagger/OpenAPI version: OpenAPI 3.0

Describe the bug you're encountering

When the Content-Type response header is not set, swagger-ui does not show the Response Body. I am seeing this issue when using OpenAPI 3.0 with swagger-ui 3.26.2
Screen Shot 2020-06-15 at 5 41 59 PM

When using Swagger 2.0 with swagger-ui 2.2.10, we do see Response Body even when the Content-Type response header is not set.
Screen Shot 2020-06-15 at 5 44 32 PM

As you can see in the above picture, the Content-Type is set to null

So I am wondering if there is any way for swagger-ui(3.26.2) to show the Response Body even when the Content-Type response header is not set

Additional context or thoughts

I can confirm that if I pass in the Content-Type response header, the Response Body is seen like below

Screen Shot 2020-06-15 at 5 53 08 PM

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions