Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You can import the OpenAPI document into SwaggerHub and generate a client from there. SwaggerHub is simple to use but does not support all the languages, libraries and options that Codegen supports, so you might want to look into it next.

...

Swagger Codegen

Swagger Codegen is a Java based code generator. You can run it from the command line as a CLI application, or through Maven. It supports a large amount of languages and has a large amount of customisation options.

Code Block
java -jar swagger-codegen-cli.jar generate \
  -i openapi.json \
  -o apiclient \
  -l java

OpenAPI Generator

OpenAPI Generator is similar to Swagger Codegen. Most of the options are identical. It supports a slightly different set of languages and libraries, and generates slightly different style of code.

Code Block
java -jar openapi-generator-cli.jar generate \
  -i openapi.json \
  -o apiclient \
  -g java \
  --skip-validate-spec