Overview
OpenAPI Generator turns OpenAPI 2/3 definitions into API client SDKs, server stubs, documentation, and configuration across many languages and frameworks. It can be used through a CLI, Docker, Maven, Gradle, and other integration paths.
Features and best fit
Based on official documentation; not hands-on tested · Content checked:
Generate multiple implementation targets from one API definition
A shared OpenAPI contract can produce clients, server stubs, documentation, and related artifacts for many languages and frameworks.
Integrate generation through CLI, Docker, or build tools
The project supports local CLI use plus Docker, Maven, Gradle, and other workflows that can be incorporated into development and CI.
For teams repeatedly producing SDKs or server scaffolding from API contracts
It fits multi-language API programs that want OpenAPI to remain the common contract while reducing repeated handwritten client and server boilerplate.
Sources: [2]
Do not feed untrusted specifications or templates directly into generation
The README warns that untrusted specs, templates, options, environment variables, or other inputs should be reviewed before code generation because they can create security risks such as code injection.
Sources: [2]
Official sources
- [1]OpenAPITools/openapi-generator repository(2026-09-21)
- [2]OpenAPI Generator README(2026-09-21)
- [3]OpenAPI Generator installation(2026-09-21)
- [4]OpenAPI Generator usage(2026-09-21)
- [5]OpenAPI Generator Apache-2.0 license(2026-09-21)
Supplemental curator note
OpenAPI Generator is a separate project from the OpenAPI Initiative itself. Its README warns users to review untrusted OpenAPI specifications, templates, options, environment variables, and other inputs before generation because generated output can introduce security risks. The master README identifies the current line as 7.26.0.
Try it in 3 steps
- 1
Add the CLI package to a project
Use the npm package from the official installation guide so the generator can be invoked project-locally.
npm install @openapitools/openapi-generator-cli - 2
Prepare the sample OpenAPI definition
Save the official OpenAPI 3 Petstore definition into the working directory.
Download petstore.yaml from the official repository - 3
Generate a Ruby client
Run the same SDK-generation example shown in the official installation guide. Review untrusted specs or templates before generation.
npx @openapitools/openapi-generator-cli generate -i petstore.yaml -g ruby -o /tmp/test/
Growth
Growth trends · Last 30 days
26,751 Stars
Trend data is still being collected.
Development activity
Last 90 days · weekly
- Commits (last 30 days)
- 117
- Open PRs
- 616
Development activity is still being collected.
Built with
Categories and tags
Categories
GitHub data
GitHub dataView detailed GitHub data
GitHub Topics
- rest-api
- rest-client
- sdk
- generator
- restful-api
- api
- api-client
- api-server
- openapi3
- openapi
- rest
- openapi-generator
- Stars
- 26,751
- Forks
- 7,676
- Watchers
- 221
- Open issues
- 5,126
- Contributors
- 404
- Primary language
- Java
- License
- Apache-2.0
- Repository last updated
- Sep 21, 2026
Related information
Write a related articleShare a guide or use case for this OSS in Markdown. Articles are published after administrator approval.
Explore next
- FastAPI102,494 Stars
2 shared tag(s) · 1 shared category(s)
A Python web framework that derives validation, OpenAPI, and interactive API docs from type hints.
Python - OpenSearch13,748 Stars
2 shared tag(s) · Same language
An Apache-2.0 distributed engine for RESTful full-text search, analytics, and observability over unstructured data.
Java - Axios109,206 Stars
1 shared tag(s) · 2 shared category(s)
A Promise-based HTTP client for browsers and Node.js with interceptors, adapters, cancellation, and transport controls.
JavaScript - tRPC40,630 Stars
1 shared tag(s) · 2 shared category(s)
A TypeScript RPC framework that propagates server types to clients so inputs, outputs, and errors stay type-safe without separate schema or code generation.
TypeScript - GraphQL Code Generator11,260 Stars
1 shared tag(s) · 2 shared category(s)
A plugin-based generator that turns GraphQL schemas and query/mutation/subscription documents into TypeScript types, client code, resolver types, and other outputs.
TypeScript
Report incorrect information
Tell us if any listing information is incorrect or outdated.