Generation of a client for REST APIs

JAVA with retrofit

  1. download the current Swagger version (at least 2.2.2)
  2. generate client with the following command:

Example:

java -jar swagger-codegen-cli-2.2.2.jar generate -i swagger.yaml -l java -c codegen-config-file.json -o europace-api-client

Example file:
codegen-config-file.json

{
  "artifactId": "europace-api-client",
  "groupId": "de.europace.api",
  "library": "retrofit2",
  "artifactVersion": "0.1",
  "dateLibrary": "java8"
}