1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-23 17:22:08 +02:00
tldr/pages/common/swagger-codegen.md
Vitor Henrique 46a054215a
pages*: make help and version commands comply with the style guide (#12107)
* pages*: use generic word for help

* git: add newline to the end

Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>

* pages*: make help and version commands comply with the style guide

* java: fix Java name

---------

Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
2024-01-30 12:55:24 +08:00

20 lines
686 B
Markdown

# swagger-codegen
> Generate code and documentation for your REST api from a OpenAPI/swagger definition.
> More information: <https://github.com/swagger-api/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}} -D{{useRxJava2}}={{true}}`
- List available languages:
`swagger-codegen langs`
- Display help for a specific command:
`swagger-codegen {{generate|config-help|meta|langs|version}} --help`