How do I use the public swagger-generator docker image to generate a client?
<p>We have a fully dockerized web app with a valid Swagger definition for the API. The API runs in its own docker container, and we're using docker-compose to orchestrate everything. I want to generate a Ruby client based on the Swagger definition located at <code>http://api:8443/apidocs.json</code>.</p>

<p>I've poured through the documentation <a href="https://github.com/swagger-api/swagger-codegen">here</a>, which led me to <a href="https://hub.docker.com/r/swaggerapi/swagger-generator/">Swagger's public docker image</a> for generating client and server code. Sadly the documentation is lacking and offers no examples for actually generating a client with the docker image.</p>

<p>The <a href="https://github.com/swagger-api/swagger-codegen/blob/master/modules/swagger-generator/Dockerfile">Dockerfile</a> indicates its container runs a web service, which I can only assume is the dockerized version of <a href="http://generator.swagger.io">http://generator.swagger.io</a>. As such, I would expect to be able to generate a client with the following command: </p>

<p><code>curl -X POST -H "content-type:application/json" -d \
'{"swaggerUrl":"http://api:8443/apidocs"}' \
http://swagger-generator:8080/api/gen/clients/ruby</code></p>

<p>No luck here. I keep getting "invalid swagger definition" even though I've confirmed the swagger definition is valid with <code>(npm -q install -g swagger-tools &gt;/dev/null) &amp;&amp; swagger-tools validate http://api:8443/apidocs</code>.</p>

<p>Any ideas?</p>