Forum Discussion
HKosova
7 years agoSmartBear Alumni (Retired)
Hi jg11,
"Try it out" requests are proxied through SwaggerHub servers in order to bypass CORS restrictions in browsers. So, SwaggerHub needs the API server to be reachable over the public Internet. Localhost and local IPs are not supported as target servers.
To test against localhost, you can load your API definition into standalone Swagger UI, e.g.:
http://petstore.swagger.io/?url=https://api.swaggerhub.com/apis/{owner}/{name}/{version}
and test the requests from there.
Make sure to replace app.swaggerhub.com with api.swaggerhub.com in your API definition address in the link above.
You may also need to enable CORS on your localhost in order for "try it out" to work.
Also feel free to submit an enhancement request for SwaggerHub:
https://community.smartbear.com/t5/SwaggerHub-Feature-Request/idb-p/SwaggerHubFeatureRequest
Related Content
- 9 years ago
- 12 years ago
Recent Discussions
- 11 days ago
- 2 months ago