uplinks:: OpenAPI
tags:: #lang/en #type/tool
OpenAPI Generator
A tool to generate clients, servers, and documentation from OpenAPI 2.0/3.x documents
Main Features
- More than 50+ client generators
- Automatically generate and distribute clients as part of official SDKs
- More than 40+ server stub generators
- Some support Inversion of Control
- Schema Generators
- MySQL, GraphQL, protobuf
- Generate Documentation
- HTML, Cwiki, Markdown
- Config Generators
- Apache2 Configuration
Installation
npm
# install the latest version of "openapi-generator-cli"
npm install @openapitools/openapi-generator-cli -g
# use a specific version of "openapi-generator-cli"
openapi-generator-cli version-manager set 5.3.0
Homebrew
brew install openapi-generator
Usage
# Generate a ruby client from a valid petstore.yaml doc
openapi-generator-cli generate -i petstore.yaml -g ruby -o /tmp/test/