Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

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.

share|improve this answer
    
I didn't download the build, I downloaded the sources. Your link to the pre-built distribution works fine. –  Eyal Jan 13 '13 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 '13 at 0:31
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.