Command-line tool
swagger-codegen
brew/swagger-codegen
Checked 25 Oct 2026, 21:09 UTC · Listing refreshed from Homebrew, winget, npm, Scoop and cargo; npm packages checked against OSV.dev
Generate clients, server stubs, and docs from an OpenAPI spec
At a glance
- Type
- Command-line tool
- Install on
- macOS, Linux
- Last checked
- 25 Oct 2026, 21:09 UTC
Install it
macOS
brew install swagger-codegen
Linux
brew install swagger-codegen
Generate documentation and code from an OpenAPI/swagger file
swagger-codegen generate -i swagger_file -l language
Generate Java code using the library retrofit2 and the option useRxJava2
swagger-codegen generate -i http://petstore.swagger.io/v2/swagger.json -l java --library retrofit2 -DuseRxJava2=true
List available languages
swagger-codegen langs
Browse
Related command-line tools
- openapi-typescript-codegen
Library that generates Typescript clients based on the OpenAPI specification. openapi swagger generator typescript… - @openapitools/openapi-generator-cli
A npm package wrapper for OpenAPI Generator (https://github.com/OpenAPITools/openapi-generator), generates which API… - openapi-generator
Generate clients, server & docs from an OpenAPI spec (v2, v3) - fastify-openapi-glue
generate a fastify configuration from an openapi specification fastify swagger openapi generator - go-swagger
Golang implementation of Swagger 2.0 (OpenAPI 2.0) - swagger-cli
Swagger 2.0 and OpenAPI 3.0 command-line tool swagger openapi open-api cli rest api yaml parse parser validate… - vacuum
World's fastest OpenAPI & Swagger linter - nswagstudio
The OpenAPI/Swagger API toolchain for .NET and TypeScript
Listing text is written by the maker; AptLynx lists tools and does not vouch for them. Find another tool · Browse by topic · For agents