0

Is there a way of prettifying JSON in response bodies in Swagger UI? I'm using SwaggerUIBundle.

Marko Galesic
  • 472
  • 5
  • 17
  • Try Wirespec instead. It is way better than Swagger and has built-in formatting for JSON. https://wirespec.dev – Johann Dec 19 '20 at 11:01
  • 3
    I believe Swagger UI pretty-prints JSON responses by default. Is your response actually `Content-Type: application/json`? – Helen Dec 21 '20 at 07:24

1 Answers1

0

My API was returning text content for Content-Type. Using Flask as a proxy and was only returning the content of the requests response. This SO post helped Return a requests.Response object from Flask

Marko Galesic
  • 472
  • 5
  • 17