A template-driven engine to generate API clients, server stubs, and documentation from OpenAPI/Swagger definitions.
Swagger Codegen is an open-source code generation tool that reads OpenAPI (Swagger) specification files and automatically produces API client libraries, server stubs, and API documentation. It solves the problem of manually writing boilerplate code for API integrations and server implementations, ensuring they stay synchronized with the API specification.
API developers, backend engineers, and full-stack teams who need to generate consistent SDKs, server skeletons, or documentation from OpenAPI definitions across multiple programming languages.
Developers choose Swagger Codegen for its extensive language support, template customizability, and ability to keep client and server code in sync with the API specification, drastically reducing development time and errors compared to manual coding.
swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Generates code for over 30 languages and frameworks, including client SDKs for Swift and TypeScript and server stubs for Spring and Flask, as detailed in the README's supported languages list.
Produces both API client libraries and server stubs from the same OpenAPI spec, ensuring consistency and reducing integration errors, which is a core feature highlighted in the description.
Creates static HTML, dynamic HTML, and Confluence Wiki documentation directly from OpenAPI definitions, streamlining API documentation workflows as mentioned in the key features.
Uses a template-driven engine that allows developers to modify code generation templates for tailored outputs, with options for advanced configuration per the README.
Integrates with Maven, Gradle, Docker, and CLI for automated code generation in pipelines, supported by the workflow integration documentation.
Maintains separate 2.X and 3.X version lines with different group IDs, and OpenAPI 3.0 is only supported in 3.X, leading to complexity in choosing the right version, as warned in the README.
The README explicitly warns that code injection can occur if OpenAPI specs from untrusted sources are used without review, requiring extra caution in automated workflows.
Initial setup involves cloning the repository, building with Maven, and running Java commands, which is more cumbersome than using pre-packaged alternatives or simpler tools.
Generated code is provided 'AS IS' with no warranties, and the README notes that it may require significant modifications for production use, especially for less-maintained language generators.