Swagger UI showing no response in developer portal even after adding CORS header

aryapr2012
Participant I

I have uploaded API spec using Swagger UI Formatter in developer portal. While trying out the request, I'm getting the error 'no response from server'. However while executing the curl on editor for the same, I'm getting the expected response.

I also tried the same swagger using Smartdocs and it seems to be working. Hence, tried enabling CORS at the server, still no luck. I chose Swagger UI over Smartdocs since the look and feel is better.

I am using Drupal version 7.56, Swagger UI version 7.x-1.2 and Apache MySQL Setup.

Can anyone please suggest if upgrading the Swagger UI to a higher version resolve this issue?

7828-dev-portal-response-error.png

0 1 1,425
1 REPLY 1

I would check the browser developer tools. Chrome devtools, Firefox debugger, Edge Devtools, etc.

You will be able to see the network request being sent out and the response that is received.

It's possible the CORS headers are not being received, as you are expecting.