2

I have a REST API that is integrated with Swagger UI. However, when I try to execute a request from Swagger UI, the interface only shows me the curl command but provides no server response. The curl command returns the expected response when run from the command line, but nothing shows up in the UI itself.

What could I do to resolve this?

enter image description here

Shuklaswag
  • 903
  • 9
  • 23
  • Are there any errors in the browser console? – Helen Jul 17 '17 at 18:10
  • nope, no errors show up. Looking at my logs, all of the expected backend processing from the API call is working correctly. The only "error" is that the output fails to display on Swagger UI. – Shuklaswag Jul 17 '17 at 18:32
  • Which exactly version of Swagger UI 3.0.x are you using? Can you try the latest master? Can it possibly be a [CORS issue](https://github.com/swagger-api/swagger-ui#cors-support)? What is the response HTTP status for this request? Earlier 3.0.x versions [had an issue](https://github.com/swagger-api/swagger-ui/issues/3041) where the 4xx and 5xx responses were not rendered, but it was fixed. – Helen Jul 17 '17 at 21:45

1 Answers1

0

I have the same issue and it seems to be a bug.

The good news is that the request is actually sent and you can see the response in you developer console network tab (select your request and click on response). If there's any issue google how to track network activity within your browser.

herm
  • 9,957
  • 6
  • 34
  • 54
  • Indeed, the error seems to have magically fixed itself up a few days later without touching the code. I wonder if something in the configuration was messed up. – Shuklaswag Jul 27 '17 at 17:30