Link Search Menu Expand Document


Generate code and documentation for your REST api from a OpenAPI/swagger definition. More information:

  • 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 {{}} -l {{java}} --library {{retrofit2}} -D{{useRxJava2}}={{true}}

  • List available languages:

swagger-codegen langs

  • Display help for a specific command:

swagger-codegen {{generate|config-help|meta|langs|version}} --help