OpenAPI Generator is an Apache-2.0 licensed Java tool that generates API client libraries, server stubs, documentation, and configuration automatically from an OpenAPI Specification, and it is built for development teams that keep a machine-readable API description and want generated code to stay in step with it.
What it is
OpenAPI Generator reads an OpenAPI Specification — both v2 and v3 — and emits API client libraries (SDK generation), server stubs, documentation, and configuration from that single source. It is a Java project published under the OpenAPITools organisation, licensed under Apache-2.0, distributed with documentation at openapi-generator.tech, and developed on the master branch currently at version 7.26.0. The registry lists 26,745 stars, 7,673 forks, and 5,751 open issues, with the most recent push on 2026-09-17.
The concrete problem it solves is repetitive, drift-prone boilerplate. Instead of hand-writing a REST client per target language, or hand-writing server stubs and documentation from the same contract, a team points the generator at its spec and gets those artefacts produced mechanically. The specific thing it replaces in that role is Swagger Codegen: the README carries a dedicated migration guide, docs/migration-from-swagger-codegen.md, for teams moving across. It lives in the OpenAPI and REST tooling ecosystem alongside specs, clients, and servers, which is reflected in its topic list (api, api-client, api-server, openapi, openapi3, rest, rest-api, rest-client, restful-api).
Key capabilities
- Generates API client libraries, server stubs, documentation, and configuration from OpenAPI v2 and v3 specifications.
- Published in Maven Central under group
org.openapitools, artefact openapi-generator, with a stable-release badge drawn from Maven metadata.
- Accepts templates, options, and environment variables as generation inputs, which is what makes the output customisable — and what the README flags as a security surface.
- Distributed through Conan Center in addition to Maven.
- Continuous integration coverage through CircleCI integration tests and Bitrise, which the README labels for Swift 4 and 5.
- Ships a published migration path from Swagger Codegen, plus a Wiki, an FAQ, and the eBook "A Beginner's Guide to Code Generation for REST APIs".
- Supported by a Slack chat room, a Twitter account, and an Open Collective funding programme with bronze sponsors including Namsor, Lightbow, DocSpring, and Datadog.
Who uses it and how
- Server-side teams that keep an OpenAPI contract and generate server stubs from it rather than writing route and model scaffolding by hand.
- Client-side teams that generate API client libraries and REST clients in their target languages from the same contract.
- Teams already on Swagger Codegen that follow the repository's migration guide to move their generation pipeline across.
- Contributors who use the Gitpod-based environment, CONTRIBUTING.md, and the "help wanted" labelled issue list; the repository also carries the hacktoberfest topic.
- Organisations that fund the project through Open Collective, either as sponsors or as individual backers.
Getting started
Consume the stable release from Maven Central as org.openapitools:openapi-generator, or install the Conan Center package; the README points to the Wiki, the FAQ, and the eBook for first-time setup, and to CONTRIBUTING.md for building from source.
How it compares
Among the similar tools named in the facts, Swagger Codegen is the direct reference point: OpenAPI Generator is the project its users are directed toward, and the repository supplies docs/migration-from-swagger-codegen.md to make that move explicit. No paid or proprietary products are named in the facts, so no licence, cost-model, or self-hosting comparison against commercial generators can be made here.
When to use it — and when not to
Use it when a team owns its OpenAPI specification and wants generated clients, stubs, docs, and configuration kept consistent with it at low marginal cost. Do not use it on untrusted inputs without review: the README warns explicitly that a specification, template, or any input such as options or environment variables obtained from an untrusted source must be inspected first, because generation carries a code-injection risk, and it asks that vulnerabilities be reported to [email protected]. Weigh the 5,751 open issues if you need fast upstream fixes, and note that both OpenAPITools and OpenAPI Generator state they are not affiliated with the OpenAPI Initiative — relevant if affiliation matters to your procurement.