Clients
Clients
With 50+ client generators, you can easily generate code to interact with any server which exposes an OpenAPI document.
Maintainers of APIs may also automatically generate and distribute clients as part of official SDKs.
Each client supports different options and features, but all templates can be replaced with your own Mustache-based templates.
See Customization for details.
Servers
Servers
Getting started with server development can be tough, especially if you're evaluating technologies. We can reduce the burden when you bring your own OpenAPI document.
Generate server stubs for 40+ different languages and technologies, including Java, Kotlin, Go, and PHP.
Some generators support Inversion of Control, allowing you to iterate on design via your OpenAPI document without worrying about blowing away your entire domain layer when you regenerate code.
Schemas/Configs
Schemas/Configs
Ever wanted to iteratively design a MySQL database, but writing table declarations was too tedious?
OpenAPI Generator offers some special generators such as Apache2 Configuration, MySQL and GraphQL schema generators.
You can easily extend these generators and their templates to create derivative generators!
Documentation
Documentation
OpenAPI documents allow you to convert the metadata about your API into some other format.
We include documentation formats such as HTML and Cwiki, which allow you to distribute static documentation to your consumers.
We also support generating from OpenAPI 2.0 to newer JSON/YAML OpenAPI 3.x documents.
Learn How
Learn How
OpenAPI Generator supports many different integrations and use cases, including (but not limited to):
- Maven Plugin
- Gradle Plugin
- CLI via Homebrew
- CLI via Docker
- Generator SaaS
For details, see Workflow Integrations
Generation also allows for easy customization via options, custom templates, or even custom generators on your classpath. See Customization for details.
As a very community-oriented project, the core team is also active on the project's Gitter channel.
Try via NPM
Try via NPM
The NPM package wrapper is cross-platform wrapper around the .jar artifact. Install globally, exposing the CLI on the command line:
# install the latest version of "openapi-generator-cli"
npm install @openapitools/openapi-generator-cli -g
# install a specific version of "openapi-generator-cli"
npm install @openapitools/openapi-generator-cli@cli-3.0.0 -g
# Or install it as dev-dependency in your node.js projects
npm install @openapitools/openapi-generator-cli -D
Then, generate a ruby client from a valid petstore.yaml doc:
openapi-generator generate -i petstore.yaml -g ruby -o /tmp/test/

Try via Homebrew
Try via Homebrew
Install via homebrew:
brew install openapi-generator
Then, generate a ruby client from a valid petstore.yaml doc:
openapi-generator generate -i petstore.yaml -g ruby -o /tmp/test/

Try via Docker
Try via Docker
The OpenAPI Generator image acts as a standalone executable. It can be used as an alternative to installing via homebrew, or for developers who are unable to install Java or upgrade the installed version.
To generate code from a valid petstore.yaml doc with this image, you'll need to mount a local location as a volume.
docker run --rm \
-v ${PWD}:/local openapitools/openapi-generator-cli generate \
-i petstore.yaml \
-g go \
-o /local/out/go