0

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 1

1

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: https://github.com/wordnik/swagger-ui/downloads 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: https://github.com/wordnik/swagger-core/wiki/java-jax-rs

  • 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
  • I didn't download the build, I downloaded the sources. Your link to the pre-built distribution works fine.
    – Eyal
    Jan 13, 2013 at 20:38
  • great, unfortunately github has deprecated the download feature, so we're going to have to distribute the distribution a different way
    – user122009
    Jan 14, 2013 at 0:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .