Swagger UI generates interactive API documentation in the browser from an OpenAPI specification file.
OpenAPITools/openapi-generator
Generates API client SDKs, server stubs, and documentation in many languages from an OpenAPI (v2/v3) specification.
Open-source alternative to:SwaggerHub
Stoplight 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
Open-source API development ecosystem for building, sending and testing HTTP, GraphQL, WebSocket and other API requests, offered as web, desktop and CLI tools.
Open-source API client that stores collections as plain-text files on your filesystem, an offline alternative to Postman and Insomnia.
Self-hosted, open-source PDF editing platform for editing, signing, redacting, converting and automating PDFs in the browser, desktop, or via API.
Self-hosted, open-source workout, nutrition and body weight tracker built on Django, with Docker deployment and a REST API.
Patches developer fonts such as Hack and Source Code Pro with thousands of icon glyphs from popular icon sets like Font Awesome and Devicons.