Can I use localhost as host in swaggerhub?
Hi there - I'm new to swaggerhub so noob question alert!
Can I use swaggerhub (app.swaggerhub.com) to test out apis hosted on my localhost? The CURL being generated by swaggerhub is perfect and works if I run it from git bash (I'm on windows). curl -X GET "http://localhost:57280/api/open" -H "accept: application/json".
However, when I click execute on swaggerhub it gives this error:
content-length: 0 date: Sun, 11 Mar 2018 18:24:25 GMT server: nginx/1.8.0 + Phusion Passenger 5.0.22 status: 403, 403 Forbidden x-powered-by: Express, Phusion Passenger 5.0.22
This leads me to believe that the URL is getting sent to swaggerhub's servers for resolution, and thus clearly localhost won't mean the same thing "over there". Or is swaggerhub editor/UI an SPA which emits the URL locally to my browser such that it _could_ resolve properly, but I'm just doing something wrong?
CHeers!
JG
Full swagger ..
swagger: '2.0'
info:
version: '1.0'
title: 'Basic features of azure b2c'
description: 'Basic features of azure b2c'
host : 'localhost:57280'
basePath : '/api'
paths:
/open:
# In this operation we do not apply the security, because it was applied globally above.
# The security will be applied to this operation for that reason.
get:
summary: Server example operation
description: This is an example operation to show how security is applied to the call.
responses:
200:
description: OK
schemes:
- http