I'd like to use Swagger, the api-documentation tool on my Ubuntu 12.04 system. On a Windows machine I just open the index.html file with Firefox and put in the address that I want the swagger-ui to work with, but on Ubuntu it seems like it isn't working properly - I can see that the Swagger-ui isn't even trying to fetch the resources page.
Has anyone succeeded in doing this? Did you install coffeescript and handlebars, or do something else?
1 Answer
if firefox can open file-based resources then there shouldn't be an issue. I'd suggest the following:
Use the pre-built distribution from here: Otherwise you'll need to follow the instructions to build it from scratch, since the source uses coffeescript, etc.
Open the network panel to see if there are requests to external resources. If you're hosting the swagger-based json files on a web server, or using server integration to create them automatically, you might need to set the
Access-Control-Allow-Origin: *as described here:Look in the console output to see if there is any javascript error emitted from reading an invalid spec file
You shouldn't need to install coffeescript or handlebars to run the UI, only build it.
2