# swagger-api/swagger-codegen

swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition.

Repository: https://github.com/swagger-api/swagger-codegen
Canonical: https://ross.abutalabs.com/products/swagger-codegen
Homepage: http://swagger.io
Language: Mustache
License: Apache-2.0
License Family: permissive
Topics: swagger, swagger-codegen, rest, rest-api, openapi-specification, openapi3, open-source, swagger-oss
Last push: 2026-08-18T13:51:20+00:00

## Health v2 (maintenance only)
Score: 98/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 98, release rhythm 96, longevity 100
- inputs: {"age_days": 5537, "days_push": 15, "days_rel": 29, "gap_med": 14.5, "n_releases_24m": 29}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 17780, forks 5966 (observed 2026-08-28T04:11:20.408552+00:00)

## What it is
Swagger Codegen is a template-driven code generator that parses OpenAPI/Swagger definitions to produce API client SDKs, server stubs, and documentation in dozens of languages. It is the 2.X/3.X line of the Swagger code generation toolchain, maintained by SmartBear's open source project.

## Use cases
- generate a Java or Python client SDK from an OpenAPI spec
- scaffold server stubs for a REST API from a Swagger definition
- produce API documentation from an OpenAPI 2.0 file
- generate TypeScript or Go API clients for a microservice
- bootstrap backend implementations in Spring, Flask, or Go from an API contract
- automate SDK generation in a CI pipeline from an OpenAPI definition

## When to choose
- you need client SDKs or server stubs in many languages from an OpenAPI/Swagger 2.0 spec
- you want a mature, widely adopted generator with extensive language support
- you need customizable Mustache templates for code generation

## When to avoid
- your spec is OpenAPI 3.1, which is better supported by OpenAPI Generator
- you only need interactive API documentation rather than generated code
- you want actively evolving features - the project is in maintenance mode with successors available

## Facets
- artifact type: cli-tool
- maturity: maintenance
- function: sdk, api-framework, documentation, templating, developer-tools
- domain: apis, web-development, developer-tools, documentation
- platform: cross-platform, cli, jvm
- tags: openapi, swagger, code-generation, client-sdk, server-stubs, mustache-templates, rest-api

## Member repositories
- swagger-api/swagger-codegen (main) score 98

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:20.408552+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:02:27.430004+00:00, confidence not recorded.
  - readme: https://github.com/swagger-api/swagger-codegen (fetched 2026-08-28T04:11:20.408552+00:00, sha 0a28603710d6)
  - homepage: http://swagger.io (fetched 2026-08-29T08:00:31.302825+00:00, sha 4f1f57a23ce3)
  - site_page: https://swagger.io/docs (fetched 2026-08-29T08:00:31.314370+00:00, sha bc9e768d7742)
  - site_page: https://swagger.io/product/portal (fetched 2026-08-29T08:00:31.312471+00:00, sha a39114d3b402)
- Data as of 2026-08-30T08:39:29.467469+00:00.
