7,363 open-source and SaaS tools, with GitHub stats refreshed every day.

OpenAPI Generator

Open source

A Java-based generator that creates API client libraries, server stubs, documentation and configuration automatically from an OpenAPI specification.

Open-source alternative to

openapi-generator.tech
OpenAPI Generator homepage screenshot
GitHub stars
27k
Last commit
today
Repository age
8 years
Version
v7.25.0
Licence
Apache-2.0
Self-hosted
Yes

About OpenAPI Generator

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

Good fit for

  • →Shipping SDKs for a public API
  • →Generating server skeletons from a spec
  • →Keeping clients in sync with an API contract
Built with
Java
Tags
openapi
code-generation
sdk
api-client
swagger
java
rest-api
api-tools

OpenAPI Generator: questions and answers

What is OpenAPI Generator used for?
OpenAPI Generator is a Java-based generator that creates API client libraries, server stubs, documentation and configuration automatically from an OpenAPI specification. It is a good fit for shipping SDKs for a public API, generating server skeletons from a spec and keeping clients in sync with an API contract.
Is OpenAPI Generator open source?
Yes. OpenAPI Generator is open source under the Apache-2.0 licence. Its source code is on GitHub at OpenAPITools/openapi-generator and is written mainly in Java.
Is OpenAPI Generator free?
Yes. OpenAPI Generator is open source, so the software itself is free to use.
What is OpenAPI Generator an alternative to?
OpenAPI Generator is an open-source alternative to Stainless, Speakeasy, APIMatic and SwaggerHub. Other open-source alternatives to Stainless include Cortex Docs.
Is OpenAPI Generator actively maintained?
Yes. The most recent commit to OpenAPI Generator was on 2 October 2026, and the latest release is v7.25.0, published on 24 August 2026. The project has 27k stars on GitHub.

Open-source alternatives to OpenAPI Generator

See all

SaaS alternatives to OpenAPI Generator

See all