OpenAPI Generator
A Java-based generator that creates API client libraries, server stubs, documentation and configuration automatically from an OpenAPI specification.
- GitHub stars
- 27k
- Last commit
- yesterday
- Latest release
- v7.25.0
- Licence
- Apache-2.0
- Self-hosted
- Yes

OpenAPI Generator takes an OpenAPI specification, in version 2 or 3, and produces client SDKs, server stubs, documentation and configuration automatically. Instead of hand-writing the same API wrapper in every language, teams define the API once and generate code for many languages and frameworks.
The project, written in Java and maintained by the OpenAPI Tools organization, offers a migration guide for users coming from Swagger Codegen, a wiki and FAQ, and an eBook introducing code generation for REST APIs. It carries an explicit security warning: if the spec, templates or other inputs such as options and environment variables come from an untrusted source, review them first to avoid problems like code injection. Vulnerabilities should be reported to the maintainers by email.
OpenAPI Generator is Apache-2.0 licensed and runs locally or in CI as a command line tool, Maven or Gradle plugin, or Docker image, so there is no hosted service involved. It suits API providers shipping official SDKs and developers who want type-safe clients generated from a contract.
Key features
- Generates API client SDKs
- Generates server stubs
- Produces documentation and configuration
- Supports OpenAPI v2 and v3 specs
- Migration guide from Swagger Codegen
- Runs from CLI, build plugins or Docker
Pricing: Free and open source under the Apache-2.0 license.
