LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

openapi-generator

generates API clients, server stubs, and documentation from OpenAPI

TLDR

Generate client library
$ openapi-generator generate -i [spec.yaml] -g [python] -o [./client]
copy
Generate server stub
$ openapi-generator generate -i [spec.yaml] -g [spring] -o [./server]
copy
List available generators
$ openapi-generator list
copy
Generate with config file
$ openapi-generator generate -i [spec.yaml] -g [typescript-axios] -c [config.yaml] -o [./client]
copy
Validate spec
$ openapi-generator validate -i [spec.yaml]
copy
Generate documentation
$ openapi-generator generate -i [spec.yaml] -g [html2] -o [./docs]
copy

SYNOPSIS

openapi-generator command [options]

DESCRIPTION

OpenAPI Generator generates API clients, server stubs, and documentation from OpenAPI (Swagger) specifications. It supports 50+ languages and frameworks.The tool is a fork of Swagger Codegen with active community development.

PARAMETERS

generate

Generate code.
validate
Validate spec.
list
List generators.
-i file
Input spec file.
-g generator
Generator name.
-o dir
Output directory.
-c file
Config file.
-p params
Additional properties.

POPULAR GENERATORS

$ Clients: python, typescript-axios, go, java
Servers: spring, python-flask, go-server
Docs: html2, markdown
copy

INSTALL

sudo pacman -S openapi-generator
copy
brew install openapi-generator
copy

CAVEATS

Generated code may need customization. Large specs produce many files. Some generators more mature than others.

HISTORY

OpenAPI Generator was forked from Swagger Codegen in 2018 by William Cheng and others to create a more community-driven project.

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid