My scenario is the following.
I have a swagger .json eg.: http://petstore.swagger.io/v2/swagger.json I want to use a generated java client for the REST API above, li
Probably the fastest and easiest way to do it:
wget https://oss.sonatype.org/content/repositories/releases/io/swagger/swagger-codegen-cli/2.2.1/swagger-codegen-cli-2.2.1.jar
java -jar swagger-codegen-cli-2.2.1.jar generate -l -i
More info here