# Swagger Codegen

> Generates API clients, server stubs and documentation from an OpenAPI or Swagger definition

Source: https://talira.ai/catalog/swagger-codegen-je8h0tky
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Command-line tool, Library
- Categories: [developer tools / api / sdk generation](https://talira.ai/categories/developer-tools/api/sdk-generation), [developer tools / code generation](https://talira.ai/categories/developer-tools/code-generation)
- Platforms: linux, macos, windows, docker, cli
- Licence: Apache-2.0
- Pricing: Free and open source
- Free tier: yes
- Self-hostable: yes
- API: yes
- Plugins: yes
- Backed by: [Swagger](https://talira.ai/orgs/swagger.md)

Swagger Codegen is the original template-driven generator from the Swagger project: it parses a Swagger or OpenAPI definition and produces API client libraries, server stubs and HTML or [Confluence](https://talira.ai/catalog/confluence-gxvsxxee.md) documentation in many languages. Two version lines are maintained independently: 2.x (group id io.swagger) for Swagger 1.x and 2.0, and 3.x (io.swagger.codegen.v3), which adds OpenAPI 3.0. It runs as a Java CLI, through Maven and Gradle plugins, as [Docker](https://talira.ai/catalog/docker-engine-9442r3nw.md) images or as a hosted generator service. [OpenAPI Generator](https://talira.ai/catalog/openapi-generator-ypxw453r.md) is a community hard fork of it from 2018.

## Links

- Website: https://swagger.io/tools/swagger-codegen/
- GitHub: https://github.com/swagger-api/swagger-codegen
- Docs: https://github.com/swagger-api/swagger-codegen/wiki

## Ways to install

### Package managers

- [Homebrew](https://talira.ai/catalog/homebrew-djy17yn9.md): <https://formulae.brew.sh/formula/swagger-codegen>[^1]

## Problems it solves

- generate a client SDK from our swagger.json file
- we have an old Swagger 2.0 spec and need server stubs for a Java or Scala service
- produce static HTML API documentation from a Swagger definition
- our build still uses a Maven plugin that generates the API client from a Swagger file
- create Spring server interfaces from an API contract before writing the implementation
- run an API code generator as a web service inside our network
- generate API clients for several languages from one definition without writing them by hand
- keep generated client code in a legacy project reproducible with the same tool and version it was made with

## Features

- API clients for many languages
- server stubs (Spring, JAX-RS, Flask, ASP.NET Core and others)
- HTML and Confluence documentation
- 2.x line for Swagger 1.x/2.0 and 3.x line adding OpenAPI 3.0
- Maven and Gradle plugins
- Docker CLI images and a generator web service image
- customisable templates

## Capabilities

- Has an API: plan not known
- Has a command line tool: plan not known
- Takes plugins: plan not known

## Trust

Overall: 0.66 out of 1.
Signals: maintenance 0.65, adoption 0.85, momentum 0.60, community 1.00, backing 0.30, extensibility 0.60.

- last commit 10 days ago
- 7 commits in the last 90 days
- latest release v3.0.85 19 days ago
- 17.8k GitHub stars
- 1248 contributors
- backed by Swagger
- has a plugin system

## Forks

- [OpenAPI Generator](https://talira.ai/catalog/openapi-generator-ypxw453r.md): Generates API clients, server stubs and documentation from OpenAPI 2.0 and 3.x documents. Its own project since 2018.

## Alternatives

- [OpenAPI Generator](https://talira.ai/catalog/openapi-generator-ypxw453r.md): Generates API clients, server stubs and documentation from OpenAPI 2.0 and 3.x documents

## Sources

[^1]: https://formulae.brew.sh/api/formula.json (checked 21 Nov 2026)
