November 2017
Intermediate to advanced
420 pages
10h 29m
English
The Swagger framework is packaged with the Swagger code generation tool as well (swagger-codegen-cli), which allows you to generate client libraries by parsing the Swagger documentation file. You can download the swagger-codegen-cli.jar file from the Maven central repository by searching for swagger-codegen-cli in http://search.maven.org. Alternatively, you can clone the https://github.com/swagger-api/swagger-codegen Git repository and build the source locally by executing mvn install.
Once you have swagger-codegen-cli.jar locally available, run the following command to generate the Java client for the REST API described in Swagger:
java -jar swagger-codegen-cli.jar generate
-i <Input-URI-or-File-location-for-swagger.json> ...