Repolode
OpenAPITools

OpenAPITools/openapi-generator

Generates API client SDKs, server stubs, and documentation in many languages from an OpenAPI (v2/v3) specification.

Open-source alternative to:SwaggerHubStoplight Studio

Stars
26,806
Forks
7,720
Open issues
5,779
Last commit
15 hours ago

What is it?

OpenAPI Generator takes an OpenAPI specification file and produces code for it automatically. It covers API client libraries across a long list of languages and frameworks, server stubs for common web frameworks, and API documentation in formats such as HTML, Markdown, and AsciiDoc. It supports OpenAPI 2.0 and 3.0, with 3.1 in beta.

The project is a Java application distributed as a JAR, Homebrew formula, Docker image, npm wrapper, and Maven/Gradle plugins. It can be run from the command line, from build tools, or through a self-hosted web service that accepts a spec over HTTP and returns a zip of generated code.

Teams typically use it to avoid writing and maintaining client code by hand, keeping SDKs in sync with a changing API definition during CI builds.

Key features

  • 01Generates API client libraries for dozens of languages and HTTP client libraries.
  • 02Produces server stubs for many frameworks, including Spring, FastAPI, and Ktor.
  • 03Creates API documentation in HTML, Markdown, AsciiDoc, and other formats.
  • 04Supports OpenAPI 2.0 and 3.0 specifications, with 3.1 in beta.
  • 05Available as a CLI, Docker image, Maven and Gradle plugins, and a self-hosted web service.

Use cases

  • Generating a typed SDK for a public REST API to share with customers.
  • Scaffolding server stubs from an API design before implementation begins.
  • Keeping client libraries in sync with an API spec through CI pipelines.
  • Producing up-to-date HTML or Markdown API docs from the spec.

Topics

FAQ

What is openapi-generator?
Generates API client SDKs, server stubs, and documentation in many languages from an OpenAPI (v2/v3) specification. OpenAPI Generator takes an OpenAPI specification file and produces code for it automatically. It covers API client libraries across a long list of languages and frameworks, server stubs for common web frameworks, and API documentation in formats such as HTML, Markdown, and AsciiDoc. It supports OpenAPI 2.0 and 3.0, with 3.1 in beta.
Is openapi-generator free to use? What license does it have?
openapi-generator is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is openapi-generator still maintained?
Actively maintained. The last commit to openapi-generator was on Oct 18, 2026.
What can I use openapi-generator for?
Generating a typed SDK for a public REST API to share with customers. Scaffolding server stubs from an API design before implementation begins. Keeping client libraries in sync with an API spec through CI pipelines. Producing up-to-date HTML or Markdown API docs from the spec.
Where can I get openapi-generator?
The source code and installation instructions are on GitHub: https://github.com/OpenAPITools/openapi-generator

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects