About this project

Swagger Codegen turns OpenAPI or Swagger API descriptions into generated client libraries, server stubs, API documentation, and supporting artifacts. The 2.x and 3.x lines are maintained independently and use different Maven group IDs; OpenAPI 3.0.x support is available only in 3.x. The README lists 3.0.71 as the current 3.x stable release for specs 1.0 through 3.0, and 2.4.46 as the current 2.x stable release for specs 1.0 through 2.0. Supported outputs cover API clients for languages such as Java, Python, JavaScript/TypeScript, Go, C#, PHP, Ruby, Swift, Kotlin, Rust, and many others; server stubs for frameworks including Spring, JAX-RS, ASP.NET Core, Go, Flask, Node.js, Rails, and Scala frameworks; and HTML, dynamic HTML, and Confluence Wiki documentation. It can also generate Apache2 configuration and JMeter-related output. The main interface is a Java CLI. A typical command uses an input specification, target language or framework, and output directory. The CLI provides general generation help and language-specific configuration help, while configuration files, custom templates, type mappings, import mappings, and selective generation allow generated output to be tailored. Dynamic HTML output can be served through the included Node.js example, while static HTML output produces a simple standalone HTML file. The project documents building with Maven, using Docker, and integrating generation into Maven, Gradle, and GitHub-based workflows. Online generators are also referenced for users who do not want to run their own instance. For specification validation, the README points to an online Swagger validator and to Spectral for local validation. A security note warns that specifications from untrusted sources should be reviewed before generation because code injection may occur. The project's templates are covered by the repository license, but generated code is intended to be AS IS, owned by the user, and not subject to the parent project license.