openapi-generator/README.md

563 lines
28 KiB
Markdown
Raw Normal View History

# OpenAPI Generator
2014-09-22 23:44:01 +00:00
- Master (2.4.0): [![Build Status](https://img.shields.io/travis/swagger-api/openapi-generator/master.svg?label=Petstore%20Integration%20Test)](https://travis-ci.org/swagger-api/openapi-generator)
[![Run Status](https://img.shields.io/shippable/5782588a3be4f4faa56c5bea.svg?label=Mustache%20Template%20Test)](https://app.shippable.com/projects/5782588a3be4f4faa56c5bea)
[![Windows Test](https://ci.appveyor.com/api/projects/status/github/swagger-api/openapi-generator?branch=master&svg=true&passingText=Windows%20Test%20-%20OK&failingText=Windows%20Test%20-%20Fails)](https://ci.appveyor.com/project/WilliamCheng/openapi-generator-wh2wu)
[![Java Test](https://circleci.com/gh/swagger-api/openapi-generator.svg?style=shield)](https://circleci.com/gh/swagger-api/openapi-generator)
- 3.0.0: [![Build Status](https://img.shields.io/travis/swagger-api/openapi-generator/3.0.0.svg?label=Petstore%20Integration%20Test)](https://travis-ci.org/swagger-api/openapi-generator)
2017-07-16 16:56:53 +00:00
[![Run Status](https://img.shields.io/shippable/5782588a3be4f4faa56c5bea/3.0.0.svg?label=Mustache%20Template%20Test)](https://app.shippable.com/projects/5782588a3be4f4faa56c5bea)
[![Windows Test](https://ci.appveyor.com/api/projects/status/github/swagger-api/openapi-generator?branch=3.0.0&svg=true&passingText=Windows%20Test%20-%20OK&failingText=Windows%20Test%20-%20Fails)](https://ci.appveyor.com/project/WilliamCheng/openapi-generator-wh2wu)
[![Java Test](https://circleci.com/gh/swagger-api/openapi-generator/tree/3.0.0.svg?style=shield)](https://circleci.com/gh/swagger-api/openapi-generator)
2017-05-30 07:16:51 +00:00
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.swagger/openapi-generator-project/badge.svg?style=plastic)](https://maven-badges.herokuapp.com/maven-central/io.swagger/openapi-generator-project)
[![PR Stats](http://issuestats.com/github/swagger-api/openapi-generator/badge/pr)](http://issuestats.com/github/swagger-api/openapi-generator) [![Issue Stats](http://issuestats.com/github/swagger-api/openapi-generator/badge/issue)](http://issuestats.com/github/swagger-api/openapi-generator)
2014-09-22 23:44:01 +00:00
:star::star::star: If you would like to contribute, please refer to [guidelines](https://github.com/swagger-api/openapi-generator/blob/master/CONTRIBUTING.md) and a list of [open tasks](https://github.com/swagger-api/openapi-generator/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22).:star::star::star:
2015-12-07 08:58:51 +00:00
:notebook_with_decorative_cover: For more information, please refer to the [Wiki page](https://github.com/swagger-api/openapi-generator/wiki) and [FAQ](https://github.com/swagger-api/openapi-generator/wiki/FAQ) :notebook_with_decorative_cover:
2016-04-13 07:57:02 +00:00
:warning: If the OpenAPI spec is obtained from an untrusted source, please make sure you've reviewed the spec before using OpenAPI Generator to generate the API client, server stub or documentation as [code injection](https://en.wikipedia.org/wiki/Code_injection) may occur :warning:
2017-03-03 13:48:57 +00:00
:notebook_with_decorative_cover: The eBook [A Beginner's Guide to Code Generation for REST APIs](https://gumroad.com/l/swagger_codegen_beginner) is a good starting point for begineers.
2014-09-22 23:44:01 +00:00
## Overview
OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an [OpenAPI Spec](https://github.com/OAI/OpenAPI-Specification). Currently, the following languages/frameworks are supported:
- **API clients**: **ActionScript**, **Ada**, **Apex**, **Bash**, **C#** (.net 2.0, 3.5 or later), **C++** (cpprest, Qt5, Tizen), **Clojure**, **Dart**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Jersey1.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured), **Kotlin**, **Lua**, **Node.js** (ES5, ES6, AngularJS with Google Closure Compiler annotations) **Objective-C**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (rust, rust-server), **Scala** (akka, http4s, swagger-async-httpclient), **Swift** (2.x, 3.x, 4.x), **Typescript** (Angular1.x, Angular2.x, Fetch, jQuery, Node)
- **Server stubs**: **Ada**, **C#** (ASP.NET Core, NancyFx), **C++** (Pistache, Restbed), **Erlang**, **Go**, **Haskell** (Servant), **Java** (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, RestEasy, Play Framework, [PKMST](https://github.com/ProKarma-Inc/pkmst-getting-started-examples)), **Kotlin**, **PHP** (Lumen, Slim, Silex, [Symfony](https://symfony.com/), [Zend Expressive](https://github.com/zendframework/zend-expressive)), **Python** (Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Rust** (rust-server), **Scala** ([Finch](https://github.com/finagle/finch), [Lagom](https://github.com/lagom/lagom), Scalatra)
[rust-server] Plaintext support; encode params (#7082) * MMORCH-428: Export the Authorization struct This is needed so that code can check that the version of Authorization in the auto-generated code is the same as the version it is using. If the versions are not exactly the same then the lookup into the TypeMap will not work. * Add Rust as a supported language for client and server. Clarify that there are two Rust client implementations, and one Rust server implementation. * Percent-encode path and query parameters in client URLs Fixes #122 Also don't include a question mark at the end of the path when there are no query paramters. Fixes #121 * Rust2 client: add --host and --port parameters to example client. Allows the example command-line client to override the default host and port. * Extract default host and port from Swagger file. * Derive 'Eq' and 'Ord' on enums * Rust2: improve server code structure. server.rs (main.rs) - main entry point for binary; starts the web server and points it at the server code within the library. server_lib/mod.rs (lib.rs) - root of library; creates the server. server_lib/server.rs (server.rs) - actual server code The old server_lib/mod.rs is now server_lib/server.rs; server_lib/mod.rs is new. This structure is easy to map onto a server implementation; unfortunately we can't get it exactly right here because of the limitations of cargo's examples/ folder. * Rust2: Explain fully how to use the example code in your project. * Added plaintext support * Linting * MGJ Markups
2017-12-08 10:42:14 +00:00
- **API documentation generators**: **HTML**, **Confluence Wiki**
- **Configuration files**: [**Apache2**](https://httpd.apache.org/)
- **Others**: **JMeter**
2014-09-22 23:44:01 +00:00
# Table of contents
- [OpenAPI Generator](#openapi-generator)
- [Overview](#overview)
- [Table of Contents](#table-of-contents)
- [Installation](#installation)
2015-10-01 21:26:24 +00:00
- [Compatibility](#compatibility)
- [Download JAR](#download-jar)
- [Build Projects](#building-projects)
2015-11-05 09:12:51 +00:00
- [Homebrew](#homebrew)
- [Docker](#docker)
2016-04-21 06:34:48 +00:00
- [Getting Started](#getting-started)
- [Usage](#usage)
- [Customization](#customization)
- [Workflow Integration](#workflow-integration)
- [Online Generators](#online-generators)
- [License Information on Generated Code](#license-information-on-generated-code)
- [Companies/Projects using Swagger Codegen](#companiesprojects-using-openapi-generator)
- [Presentations/Videos/Tutorials/Books](#presentationsvideostutorialsbooks)
- [About Us](#about-us)
- [OpenAPI Generator Core Team](#openapi-generator-core-team)
- [OpenAPI Generator Technical Committee](#openapi-generator-technical-committee)
- [History of OpenAPI Generator](#history-of-openapi-generator)
- [License](#license)
## Installation
### Compatibility
2014-09-22 23:44:01 +00:00
The OpenAPI Specification has undergone 3 revisions since initial creation in 2010. The openapi-generator project has the following compatibilities with the OpenAPI Specification:
2014-09-22 23:44:01 +00:00
2015-12-30 22:52:15 +00:00
Swagger Codegen Version | Release Date | OpenAPI Spec compatibility | Notes
2015-08-24 07:37:23 +00:00
-------------------------- | ------------ | -------------------------- | -----
4.0.0 (upcoming major release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.0.0-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Major release with breaking changes (no fallback)
3.1.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/3.1.0-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Minor release with breaking changes (with fallbacks)
3.0.0 (current master, upcoming release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/3.0.0-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Minor release without breaking changes
2014-09-22 23:44:01 +00:00
### Download JAR
If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 8 runtime at a minimum):
2015-12-30 21:40:58 +00:00
JAR location: `http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.0.0/openapi-generator-cli-3.0.0.jar`
For **Mac/Linux** users:
2017-07-20 07:16:06 +00:00
```sh
wget http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.0.0/openapi-generator-cli-3.0.0.jar -O openapi-generator-cli.jar
```
2015-12-30 21:40:58 +00:00
For **Windows** users, you will need to install [wget](http://gnuwin32.sourceforge.net/packages/wget.htm) or you can use Invoke-WebRequest in PowerShell (3.0+), e.g.
```
Invoke-WebRequest -OutFile openapi-generator-cli.jar http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.0.0/openapi-generator-cli-3.0.0.jar
2015-12-30 21:40:58 +00:00
```
After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage.
2017-11-16 09:08:16 +00:00
For Mac users, please make sure Java 8 is installed (Tips: run `java -version` to check the version), and export `JAVA_HOME` in order to use the supported Java version:
2017-07-20 07:16:06 +00:00
```sh
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
export PATH=${JAVA_HOME}/bin:$PATH
2015-12-30 21:40:58 +00:00
```
### Build Projects
To build from source, you need the following installed and available in your `$PATH:`
2014-09-22 23:44:01 +00:00
* [Java 8](http://java.oracle.com)
2014-09-22 23:44:01 +00:00
2016-03-26 02:59:08 +00:00
* [Apache maven 3.3.3 or greater](http://maven.apache.org/)
2015-11-10 02:20:49 +00:00
2014-09-22 23:44:01 +00:00
After cloning the project, you can build it from source with this command:
2017-07-20 07:16:06 +00:00
```sh
mvn clean install
2014-09-22 23:44:01 +00:00
```
2018-01-22 06:35:34 +00:00
If you don't have maven installed, you may directly use the included [maven wrapper](https://github.com/takari/maven-wrapper), and build with the command:
```sh
./mvnw clean install
2018-01-22 06:35:34 +00:00
```
### Homebrew
To install, run `brew install openapi-generator`
Here is an example usage to generate a Ruby client:
2017-07-20 07:16:06 +00:00
```sh
openapi-generator generate -i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l ruby -o /tmp/test/
```
2015-11-04 14:32:06 +00:00
### Docker
#### Public Pre-built Docker images
- [https://hub.docker.com/r/openapitools/openapi-generator-online/](https://hub.docker.com/r/openapitools/openapi-generator-online/) (official web service)
- [https://hub.docker.com/r/openapitoosl/openapi-generator-cli/](https://hub.docker.com/r/openapitoosl/openapi-generator-cli/) (official CLI)
#### OpenAPI Generator CLI Docker Image
2015-11-04 14:32:06 +00:00
The OpenAPI Generator image acts as a standalone executable. It can be used as an alternative to installing via homebrew, or for developers who are unable to install Java or upgrade the installed version.
To generate code with this image, you'll need to mount a local location as a volume.
2015-11-04 14:32:06 +00:00
Example:
2015-11-04 14:32:06 +00:00
2017-07-20 07:16:06 +00:00
```sh
docker run --rm -v ${PWD}:/local openapitools/openapi-generator-cli generate \
-i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml \
-l go \
-o /local/out/go
```
The generated code will be located under `./out/go` in the current directory.
#### OpenAPI Generator Online Docker Image
The openapi-generator-online image can act as a self-hosted web application and API for generating code. This container can be incorporated into a CI pipeline, and requires at least two HTTP requests and some docker orchestration to access generated code.
Example usage (note this assumes `jq` is installed for command line processing of JSON):
2015-11-05 09:12:51 +00:00
2017-07-20 07:16:06 +00:00
```sh
# Start container and save the container id
CID=$(docker run -d openapitools/openapi-generator-online)
# allow for startup
sleep 5
# Get the IP of the running container
GEN_IP=$(docker inspect --format '{{.NetworkSettings.IPAddress}}' $CID)
# Execute an HTTP request and store the download link
RESULT=$(curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{
"swaggerUrl": "https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml"
}' 'http://localhost:8188/api/gen/clients/python' | jq '.link' | tr -d '"')
# Download the generated zip and redirect to a file
curl $RESULT > result.zip
# Shutdown the swagger generator image
docker stop $CID && docker rm $CID
```
In the example above, `result.zip` will contain the generated client.
#### Development in docker
You can use `run-in-docker.sh` to do all development. This script maps your local repository to `/gen`
in the docker container. It also maps `~/.m2/repository` to the appropriate container location.
To execute `mvn package`:
```sh
git clone https://github.com/swagger-api/openapi-generator
cd openapi-generator
./run-in-docker.sh mvn package
```
Build artifacts are now accessible in your working directory.
Once built, `run-in-docker.sh` will act as an executable for openapi-generator-cli. To generate code, you'll need to output to a directory under `/gen` (e.g. `/gen/out`). For example:
2017-07-20 07:16:06 +00:00
```sh
./run-in-docker.sh help # Executes 'help' command for openapi-generator-cli
./run-in-docker.sh langs # Executes 'langs' command for openapi-generator-cli
./run-in-docker.sh /gen/bin/go-petstore.sh # Builds the Go client
./run-in-docker.sh generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml \
-l go -o /gen/out/go-petstore -DpackageName=petstore # generates go client, outputs locally to ./out/go-petstore
2015-11-05 09:12:51 +00:00
```
#### Run Docker in Vagrant
Prerequisite: install [Vagrant](https://www.vagrantup.com/downloads.html) and [VirtualBox](https://www.virtualbox.org/wiki/Downloads).
```sh
git clone http://github.com/openapitools/openapi-generator.git
cd openapi-generator
vagrant up
vagrant ssh
cd /vagrant
./run-in-docker.sh mvn package
```
2016-04-21 06:34:48 +00:00
## Getting Started
2015-11-05 09:12:51 +00:00
To generate a PHP client for [petstore.yaml](https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml), please run the following
2016-04-21 06:34:48 +00:00
```sh
git clone https://github.com/swagger-api/openapi-generator
cd openapi-generator
2016-04-21 06:34:48 +00:00
mvn clean package
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate \
-i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml \
2016-04-21 06:34:48 +00:00
-l php \
-o /var/tmp/php_api_client
```
(if you're on Windows, replace the last command with `java -jar modules\openapi-generator-cli\target\openapi-generator-cli.jar generate -i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l php -o c:\temp\php_api_client`)
2016-04-21 06:34:48 +00:00
You can also download the JAR (latest release) directly from [maven.org](http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.0.0/openapi-generator-cli-3.0.0.jar)
2016-04-21 06:34:48 +00:00
To get a list of **general** options available, please run `java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar help generate`
2016-04-21 06:34:48 +00:00
To get a list of PHP specified options (which can be passed to the generator with a config file via the `-c` option), please run `java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar config-help -l php`
2016-04-21 06:34:48 +00:00
## Usage
2015-11-05 09:12:51 +00:00
2014-09-22 23:44:01 +00:00
### To generate a sample client library
You can build a client against the [Petstore API](https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml) as follows:
2014-09-22 23:44:01 +00:00
2017-07-20 07:16:06 +00:00
```sh
2014-09-26 20:56:12 +00:00
./bin/java-petstore.sh
2014-09-22 23:44:01 +00:00
```
2016-04-21 06:34:48 +00:00
(On Windows, run `.\bin\windows\java-petstore.bat` instead)
2014-09-26 20:56:12 +00:00
This will run the generator with this command:
2014-09-22 23:44:01 +00:00
2017-07-20 07:16:06 +00:00
```sh
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate \
-i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml \
2014-09-26 20:56:12 +00:00
-l java \
-o samples/client/petstore/java
2014-09-22 23:44:01 +00:00
```
with a number of options. You can get the options with the `help generate` command (below only shows partial results):
2014-09-22 23:44:01 +00:00
```
NAME
openapi-generator-cli generate - Generate code with chosen lang
SYNOPSIS
openapi-generator-cli generate
2016-02-19 10:19:58 +00:00
[(-a <authorization> | --auth <authorization>)]
[--additional-properties <additional properties>...]
2016-02-19 10:19:58 +00:00
[--api-package <api package>] [--artifact-id <artifact id>]
[--artifact-version <artifact version>]
[(-c <configuration file> | --config <configuration file>)]
[-D <system properties>...] [--git-repo-id <git repo id>]
[--git-user-id <git user id>] [--group-id <group id>]
[--http-user-agent <http user agent>]
(-i <spec file> | --input-spec <spec file>)
[--ignore-file-override <ignore file override location>]
[--import-mappings <import mappings>...]
[--instantiation-types <instantiation types>...]
2016-02-19 10:19:58 +00:00
[--invoker-package <invoker package>]
(-l <language> | --lang <language>)
[--language-specific-primitives <language specific primitives>...]
[--library <library>] [--model-name-prefix <model name prefix>]
[--model-name-suffix <model name suffix>]
[--model-package <model package>]
[(-o <output directory> | --output <output directory>)]
[--release-note <release note>] [--remove-operation-id-prefix]
[--reserved-words-mappings <reserved word mappings>...]
[(-s | --skip-overwrite)]
2016-02-19 10:19:58 +00:00
[(-t <template directory> | --template-dir <template directory>)]
[--type-mappings <type mappings>...] [(-v | --verbose)]
OPTIONS
-a <authorization>, --auth <authorization>
adds authorization headers when fetching the swagger definitions
remotely. Pass in a URL-encoded string of name:header with a comma
separating multiple values
[rust-server] Plaintext support; encode params (#7082) * MMORCH-428: Export the Authorization struct This is needed so that code can check that the version of Authorization in the auto-generated code is the same as the version it is using. If the versions are not exactly the same then the lookup into the TypeMap will not work. * Add Rust as a supported language for client and server. Clarify that there are two Rust client implementations, and one Rust server implementation. * Percent-encode path and query parameters in client URLs Fixes #122 Also don't include a question mark at the end of the path when there are no query paramters. Fixes #121 * Rust2 client: add --host and --port parameters to example client. Allows the example command-line client to override the default host and port. * Extract default host and port from Swagger file. * Derive 'Eq' and 'Ord' on enums * Rust2: improve server code structure. server.rs (main.rs) - main entry point for binary; starts the web server and points it at the server code within the library. server_lib/mod.rs (lib.rs) - root of library; creates the server. server_lib/server.rs (server.rs) - actual server code The old server_lib/mod.rs is now server_lib/server.rs; server_lib/mod.rs is new. This structure is easy to map onto a server implementation; unfortunately we can't get it exactly right here because of the limitations of cargo's examples/ folder. * Rust2: Explain fully how to use the example code in your project. * Added plaintext support * Linting * MGJ Markups
2017-12-08 10:42:14 +00:00
...... (results omitted)
-v, --verbose
verbose mode
2015-11-10 02:20:49 +00:00
```
2014-09-22 23:44:01 +00:00
2014-09-26 20:56:12 +00:00
You can then compile and run the client, as well as unit tests against it:
2014-09-22 23:44:01 +00:00
2017-07-20 07:16:06 +00:00
```sh
2014-09-26 20:56:12 +00:00
cd samples/client/petstore/java
mvn package
2014-09-22 23:44:01 +00:00
```
2014-09-26 20:56:12 +00:00
Other languages have petstore samples, too:
2017-07-20 07:16:06 +00:00
```sh
2014-09-26 21:21:43 +00:00
./bin/android-petstore.sh
2014-09-26 20:56:12 +00:00
./bin/java-petstore.sh
./bin/objc-petstore.sh
2014-09-22 23:44:01 +00:00
```
### Customization
2014-09-22 23:44:01 +00:00
Please refer to [customization.md](customization.md) on how to customize the output (e.g. package name, version)
2014-09-22 23:44:01 +00:00
### Workflow Integration (Maven, Gradle, Github, CI/CD)
2015-10-22 22:34:20 +00:00
Please refer to [integration.md](integration.md) on how to integrate OpenAPI generator with Maven, Gradle, Github and CI/CD.
2015-10-22 22:34:20 +00:00
### Online OpenAPI generator
2015-10-22 22:34:20 +00:00
Please refer to [online-openapi-generator.md](online-openapi-generator.md) on how to run and use the `openapi-generator-online` - a web service for `openapi-generator`.
2015-10-22 22:34:20 +00:00
### License information on Generated Code
The OpenAPI Generator project is intended as a benefit for users of the Open API Specification. The project itself has the [License](#license) as specified. In addition, please understand the following points:
* The templates included with this project are subject to the [License](#license).
* Generated code is intentionally _not_ subject to the parent project license
2016-03-14 05:39:07 +00:00
When code is generated from this project, it shall be considered **AS IS** and owned by the user of the software. There are no warranties--expressed or implied--for generated code. You can do what you wish with it, and once generated, the code is your responsibility and subject to the licensing terms that you deem appropriate.
# Companies/Projects using OpenAPI Generator
Here are some companies/projects using OpenAPI Generator in production. To add your company/project to the list, please visit [README.md](https://github.com/openapitools/openapi-generator/blob/master/README.md) and click on the icon to edit the page.
2016-03-14 05:39:07 +00:00
- [REST United](https://restunited.com)
2016-11-29 09:12:23 +00:00
# Presentations/Videos/Tutorials/Books
2015-10-31 16:02:08 +00:00
# About Us
2015-10-31 16:02:08 +00:00
## OpenAPI Generator Core Team
2016-06-27 01:50:54 +00:00
OpenAPI Generator core team members are contributors who have been making significant contributions (review issues, fix bugs, make enhancements, etc) to the project on a regular basis.
### Core Team Members
2018-02-25 08:54:59 +00:00
* [@jimschubert](https://github.com/jimschubert) (2016/05)
* [@cbornet](https://github.com/cbornet) (2016/05)
* [@jaz-ah](https://github.com/jaz-ah) (2016/05)
* [@ackintosh](https://github.com/ackintosh) (2018/02)
2018-03-06 08:21:20 +00:00
* [@JFCote](https://github.com/JFCote) (2018/03)
* [@jmini](https://github.com/jmini) (2018/04)
2016-05-08 10:48:22 +00:00
### Template Creator
2016-05-08 10:48:22 +00:00
Here is a list of template creators:
* API Clients:
2017-10-04 03:49:40 +00:00
* Ada: @stcarrez
2016-11-29 09:12:23 +00:00
* Akka-Scala: @cchafer
* Apex: @asnelling
* Bash: @bkryza
2016-06-15 02:44:04 +00:00
* C++ REST: @Danielku15
2016-05-08 15:24:14 +00:00
* C# (.NET 2.0): @who
* C# (.NET Standard 1.3 ): @Gronsak
2017-08-10 18:05:14 +00:00
* C# (.NET 4.5 refactored): @jimschubert
2016-05-08 10:48:22 +00:00
* Clojure: @xhh
2016-11-30 15:31:21 +00:00
* Dart: @yissachar
* Dart (refactored in 2.4.0): @joernahrens
2017-01-30 09:42:00 +00:00
* Elixir: @niku
2017-12-21 08:37:53 +00:00
* Elm: @trenneman
2017-08-10 18:05:14 +00:00
* Eiffel: @jvelilla
2017-11-12 14:07:12 +00:00
* Erlang: @tsloughter
2016-11-30 15:31:21 +00:00
* Groovy: @victorgit
* Go: @wing328
* Go (rewritten in 2.3.0): @antihax
* Haskell (http-client): @jonschoning
2016-11-30 15:31:21 +00:00
* Java (Feign): @davidkiss
2016-05-08 10:48:22 +00:00
* Java (Retrofit): @0legg
* Java (Retrofit2): @emilianobonassi
2016-11-29 09:12:23 +00:00
* Java (Jersey2): @xhh
2016-05-08 10:48:22 +00:00
* Java (okhttp-gson): @xhh
2017-04-24 06:42:07 +00:00
* Java (RestTemplate): @nbruno
2017-05-02 11:10:48 +00:00
* Java (RESTEasy): @gayathrigs
* Java (Vertx): @lopesmcc
* Java (Google APIs Client Library): @charlescapps
* Java (Rest-assured): @viclovsky
2016-11-30 15:31:21 +00:00
* Javascript/NodeJS: @jfiala
2016-05-08 10:48:22 +00:00
* Javascript (Closure-annotated Angular) @achew22
2017-08-10 18:05:14 +00:00
* JMeter: @davidkiss
* Kotlin: @jimschubert
* Lua: @daurnimator
2016-05-08 10:48:22 +00:00
* Perl: @wing328
* PHP (Guzzle): @baartosz
* PowerShell: @beatcracker
2017-09-03 17:25:04 +00:00
* R: @ramnov
2017-08-06 09:06:58 +00:00
* Rust: @farcaller
[New Generator] Rust API client/server generator (#6613) * Rust API client/server generator * `Future::boxed()` has been deprecated - replace with `Box::new(...)` * rebasing to rust * MMMLS211 use empty vec over none * MMMLS211 rebuild after merge from rust * MMMLS211 YAML array examples not wrapped in Some() * MMMLS211 Array parameters bad mustache fix * MMMLS211 don't parse map containers * MMMLS211 Tidy container types * MMMLS-211 rebuild example * MMMLS211 mvn rebuild * Percent-decode parameters contained in the path * Produce warnings when unknown fields are present We still accept unknown fields and discard them. However, to improve diagnosability, we now write a warning log and return a `Warning` header. Note that this is server-only * Markup * MMMLS211: Make optional arrays Options again * 211 markups * Temporary attempt at tweaking Cow ownership tweak while merging changes from rust branch * Remove to_string call while parsing path parameters, which requires definining a temporary var in a block because rust can't tell where a Cow reference gets dropped * Fix rustfmt to the correct version * Fix rustfmt to the correct version * Add more response information to ApiError in client * Re-add missing brace * Code review markups * Allow converting out of wrapper types * Store arrays in new-types too * Use a new hyper_client every request * Add vec-like traits to array types * Xml support - new branch * Moved conversion from serde_xml_rs::Error to ApiError from swagger-rs to client code until upstream PR is accepted * MMSUB-172 Don't set Content-Type when there's no body. If we don't have a body we've serialized, then don't declare any content type for the nonexistent body. This is really important for 204 No Content responses, but it's also morally important for all other non-bodied responses. * MMSUB-172 Move to swagger 0.6. * Manually implement debug for the client * Allow `Context` to be bound to `Api`, and not passed on every function call * Support "." in parameter names * Support generate's "--reserved-words-mappings" option * Support "." in parameter names * Support generate's "--reserved-words-mappings" option
2017-10-19 09:37:02 +00:00
* Rust (rust-server): @metaswitch
[rust-server] Plaintext support; encode params (#7082) * MMORCH-428: Export the Authorization struct This is needed so that code can check that the version of Authorization in the auto-generated code is the same as the version it is using. If the versions are not exactly the same then the lookup into the TypeMap will not work. * Add Rust as a supported language for client and server. Clarify that there are two Rust client implementations, and one Rust server implementation. * Percent-encode path and query parameters in client URLs Fixes #122 Also don't include a question mark at the end of the path when there are no query paramters. Fixes #121 * Rust2 client: add --host and --port parameters to example client. Allows the example command-line client to override the default host and port. * Extract default host and port from Swagger file. * Derive 'Eq' and 'Ord' on enums * Rust2: improve server code structure. server.rs (main.rs) - main entry point for binary; starts the web server and points it at the server code within the library. server_lib/mod.rs (lib.rs) - root of library; creates the server. server_lib/server.rs (server.rs) - actual server code The old server_lib/mod.rs is now server_lib/server.rs; server_lib/mod.rs is new. This structure is easy to map onto a server implementation; unfortunately we can't get it exactly right here because of the limitations of cargo's examples/ folder. * Rust2: Explain fully how to use the example code in your project. * Added plaintext support * Linting * MGJ Markups
2017-12-08 10:42:14 +00:00
* Scala (scalaz & http4s): @tbrown1979
2016-05-08 10:48:22 +00:00
* Swift: @tkqubo
2016-10-15 10:18:10 +00:00
* Swift 3: @hexelon
2017-07-08 17:36:12 +00:00
* Swift 4: @ehyche
2016-11-29 09:12:23 +00:00
* TypeScript (Node): @mhardorf
* TypeScript (Angular1): @mhardorf
2016-05-08 10:48:22 +00:00
* TypeScript (Fetch): @leonyu
* TypeScript (Angular2): @roni-frantchi
[rust-server] Plaintext support; encode params (#7082) * MMORCH-428: Export the Authorization struct This is needed so that code can check that the version of Authorization in the auto-generated code is the same as the version it is using. If the versions are not exactly the same then the lookup into the TypeMap will not work. * Add Rust as a supported language for client and server. Clarify that there are two Rust client implementations, and one Rust server implementation. * Percent-encode path and query parameters in client URLs Fixes #122 Also don't include a question mark at the end of the path when there are no query paramters. Fixes #121 * Rust2 client: add --host and --port parameters to example client. Allows the example command-line client to override the default host and port. * Extract default host and port from Swagger file. * Derive 'Eq' and 'Ord' on enums * Rust2: improve server code structure. server.rs (main.rs) - main entry point for binary; starts the web server and points it at the server code within the library. server_lib/mod.rs (lib.rs) - root of library; creates the server. server_lib/server.rs (server.rs) - actual server code The old server_lib/mod.rs is now server_lib/server.rs; server_lib/mod.rs is new. This structure is easy to map onto a server implementation; unfortunately we can't get it exactly right here because of the limitations of cargo's examples/ folder. * Rust2: Explain fully how to use the example code in your project. * Added plaintext support * Linting * MGJ Markups
2017-12-08 10:42:14 +00:00
* TypeScript (jQuery): @bherila
2016-05-08 10:48:22 +00:00
* Server Stubs
* Ada: @stcarrez
2016-05-08 10:48:22 +00:00
* C# ASP.NET5: @jimschubert
2016-06-22 02:33:31 +00:00
* C# NancyFX: @mstefaniuk
* C++ Pistache: @sebymiano
2017-06-02 06:51:43 +00:00
* C++ Restbed: @stkrwork
2016-09-09 07:49:27 +00:00
* Erlang Server: @galaxie
2016-06-20 14:42:24 +00:00
* Go Server: @guohuang
2016-05-08 10:48:22 +00:00
* Haskell Servant: @algas
2016-10-26 06:41:44 +00:00
* Java MSF4J: @sanjeewa-malalgoda
2016-05-08 10:48:22 +00:00
* Java Spring Boot: @diyfr
2016-10-26 06:41:44 +00:00
* Java Undertow: @stevehu
* Java Play Framework: @JFCote
2017-12-19 13:12:14 +00:00
* Java PKMST: @anshu2185 @sanshuman @rkumar-pk @ninodpillai
2016-05-08 10:48:22 +00:00
* JAX-RS RestEasy: @chameleon82
2016-10-10 13:10:52 +00:00
* JAX-RS CXF: @hiveship
* JAX-RS CXF (CDI): @nickcmaynard
* JAX-RS RestEasy (JBoss EAP): @jfiala
* Kotlin: @jimschubert
2017-09-21 03:07:43 +00:00
* PHP Lumen: @abcsun
2016-05-08 10:48:22 +00:00
* PHP Slim: @jfastnacht
2017-07-05 08:58:21 +00:00
* PHP Symfony: @ksm2
2017-01-16 08:16:14 +00:00
* PHP Zend Expressive (with Path Handler): @Articus
2016-11-29 09:12:23 +00:00
* Ruby on Rails 5: @zlx
[New Generator] Rust API client/server generator (#6613) * Rust API client/server generator * `Future::boxed()` has been deprecated - replace with `Box::new(...)` * rebasing to rust * MMMLS211 use empty vec over none * MMMLS211 rebuild after merge from rust * MMMLS211 YAML array examples not wrapped in Some() * MMMLS211 Array parameters bad mustache fix * MMMLS211 don't parse map containers * MMMLS211 Tidy container types * MMMLS-211 rebuild example * MMMLS211 mvn rebuild * Percent-decode parameters contained in the path * Produce warnings when unknown fields are present We still accept unknown fields and discard them. However, to improve diagnosability, we now write a warning log and return a `Warning` header. Note that this is server-only * Markup * MMMLS211: Make optional arrays Options again * 211 markups * Temporary attempt at tweaking Cow ownership tweak while merging changes from rust branch * Remove to_string call while parsing path parameters, which requires definining a temporary var in a block because rust can't tell where a Cow reference gets dropped * Fix rustfmt to the correct version * Fix rustfmt to the correct version * Add more response information to ApiError in client * Re-add missing brace * Code review markups * Allow converting out of wrapper types * Store arrays in new-types too * Use a new hyper_client every request * Add vec-like traits to array types * Xml support - new branch * Moved conversion from serde_xml_rs::Error to ApiError from swagger-rs to client code until upstream PR is accepted * MMSUB-172 Don't set Content-Type when there's no body. If we don't have a body we've serialized, then don't declare any content type for the nonexistent body. This is really important for 204 No Content responses, but it's also morally important for all other non-bodied responses. * MMSUB-172 Move to swagger 0.6. * Manually implement debug for the client * Allow `Context` to be bound to `Api`, and not passed on every function call * Support "." in parameter names * Support generate's "--reserved-words-mappings" option * Support "." in parameter names * Support generate's "--reserved-words-mappings" option
2017-10-19 09:37:02 +00:00
* Rust (rust-server): @metaswitch
2017-01-29 04:18:49 +00:00
* Scala Finch: @jimschubert
* Scala Lagom: @gmkumar2005
2016-08-01 08:17:24 +00:00
* Documentation
* HTML Doc 2: @jhitchcock
2016-08-01 09:35:05 +00:00
* Confluence Wiki: @jhitchcock
* Configuration
* Apache2: @stkrwork
2016-05-08 10:48:22 +00:00
### How to join the core team
Here are the requirements to become a core team member:
- rank within top 50 in https://github.com/openapitools/openapi-generator/graphs/contributors
- to contribute, here are some good [starting points](https://github.com/openapitools/openapi-generator/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22)
- regular contributions to the project
- about 3 hours per week
- for contribution, it can be addressing issues, reviewing PRs submitted by others, submitting PR to fix bugs or make enhancements, etc
To join the core team, please reach out to wing328hk@gmail.com (@wing328) for more information.
2016-11-29 09:12:23 +00:00
To become a Template Creator, simply submit a PR for new API client (e.g. Rust, Elixir) or server stub (e.g. Ruby Grape) generator.
## OpenAPI Generator Technical Committee
2016-11-30 09:43:58 +00:00
Members of the OpenAPI Generator technical committee shoulder the following responsibilities:
2016-11-30 09:43:58 +00:00
- Provides guidance and direction to other users
- Reviews pull requests and issues
- Improves the generator by making enhancements, fixing bugs or updating documentations
- Sets the technical direction of the generator
2016-11-30 09:43:58 +00:00
Who is eligible? Those who want to join must have at least 3 PRs merged into a generator. (Exceptions can be granted to template creators or contributors who have made a lot of code changes with less than 3 merged PRs)
2016-11-30 09:43:58 +00:00
If you want to join the committee, please kindly apply by sending an email to wing328hk@gmail.com ([@wing328](https://github.com/wing328)) with your Github ID.
### Members of Technical Committee
| Languages | Member (join date) |
|:-------------|:-------------|
| ActionScript | |
2018-02-26 14:48:48 +00:00
| Ada | @stcarrez (2018/02) @micheleISEP (2018/02) |
| Android | @jaz-ah (2017/09) |
| Apex | |
2017-09-29 03:39:15 +00:00
| Bash | @frol (2017/07) @bkryza (2017/08) @kenjones-cisco (2017/09) |
| C++ | @ravinikam (2017/07) @stkrwork (2017/07) @fvarose (2017/11) @etherealjoy (2018/02) @martindelille (2018/03) |
| C# | @mandrean (2017/08) @jimschubert (2017/09) |
| Clojure | |
| Dart | @ircecho (2017/07) |
2017-09-29 01:47:03 +00:00
| Eiffel | @jvelilla (2017/09) |
| Elixir | |
2017-12-21 08:37:53 +00:00
| Elm | |
2017-12-23 16:49:03 +00:00
| Erlang | @tsloughter (2017/11) |
| Groovy | |
2017-12-23 16:49:03 +00:00
| Go | @antihax (2017/11) @bvwells (2017/12) |
2017-11-28 15:46:17 +00:00
| Haskell | |
| Java | @bbdouglas (2017/07) @JFCote (2017/08) @sreeshas (2017/08) @jfiala (2017/08) @lukoyanov (2017/09) @cbornet (2017/09) @jeff9finger (2018/01) |
| Kotlin | @jimschubert (2017/09) |
2017-08-30 08:28:28 +00:00
| Lua | @daurnimator (2017/08) |
| NodeJS/Javascript | @CodeNinjai (2017/07) @frol (2017/07) @cliffano (2017/07) |
| ObjC | |
| Perl | @wing328 (2017/07) |
2017-09-24 09:48:11 +00:00
| PHP | @jebentier (2017/07) @dkarlovi (2017/07) @mandrean (2017/08) @jfastnacht (2017/09) @ackintosh (2017/09) |
| Python | @taxpon (2017/07) @frol (2017/07) @mbohlool (2017/07) @cbornet (2017/09) @kenjones-cisco (2017/11)|
| R | |
2017-09-21 07:30:01 +00:00
| Ruby | @cliffano (2017/07) @zlx (2017/09) |
2017-12-15 10:51:37 +00:00
| Rust | @frol (2017/07) @farcaller (2017/08) @bjgill (2017/12) |
| Scala | @clasnake (2017/07) @jimschubert (2017/09) @shijinkui (2018/01) @ramzimaalej (2018/03) |
| Swift | @jgavris (2017/07) @ehyche (2017/08) @Edubits (2017/09) @jaz-ah (2017/09) @d-date (2018/03) |
| TypeScript | @TiFu (2017/07) @taxpon (2017/07) @sebastianhaas (2017/07) @kenisteward (2017/07) @Vrolijkx (2017/09) @macjohnny (2018/01) |
2016-12-09 07:18:55 +00:00
## History of OpenAPI Generator
OpenAPI Generator is a fork of [Swagger Codegen](https://github.com/swagger-api/swagger-codegen). In view of the issues with the Swagger Codegen 3.0.0 (beta) release and the disagreement on the project's direction, more than 30 top contributors and template creators of Swagger Codegen decided to fork Swagger Codegen and maintain a community-driven version called "OpenAPI Generator".
### Founding Members (alphabetical order):
- [Akihito Nakano](https://github.com/ackintosh)
- [Artem Ocheredko](https://github.com/galaxie)
- [Bartek Kryza](https://github.com/bkryza)
- [Ben Wells](https://github.com/bvwells)
- [Benjamin Gill](https://github.com/bjgill)
- [Christophe Bornet](https://github.com/cbornet)
- [Cliffano Subagio](https://github.com/cliffano)
- [Daiki Matsudate](https://github.com/d-date)
- [Daniel](https://github.com/Danielku15)
- [Esteban Marin](https://github.com/macjohnny)
- [Javier Velilla](https://github.com/jvelilla)
- [Jean-François Côté](https://github.com/JFCote)
- [Jim Schubert](https://github.com/jimschubert)
- [Jon Schoning](https://github.com/jonschoning)
- [Jérémie Bresson](https://github.com/jmini)
- [Jörn Ahrens](https://github.com/jayearn)
- [Marcin Stefaniuk](https://github.com/mstefaniuk)
- [Martin Delille](https://github.com/MartinDelille)
- [Masahiro Yamauchi](https://github.com/algas)
- [Ramzi Maalej](https://github.com/ramzimaalej)
- [Ravindra Nikam](https://github.com/ravinikam)
- [Sebastian Haas](https://github.com/sebastianhaas)
- [Sreenidhi Sreesha](https://github.com/sreeshas)
- [Takuro Wada](https://github.com/taxpon)
- [Tomasz Prus](https://github.com/tomplus)
- [Tristan Sloughter](https://github.com/tsloughter)
- [Victor Trakhtenberg](https://github.com/victorgit)
- [Vlad Frolov](https://github.com/frol)
- [Vladimir Pouzanov](https://github.com/farcaller)
- [Xin Meng](https://github.com/xmeng1)
- [Xu Hui Hui](https://github.com/xhh)
- [antihax](https://github.com/antihax)
- [beatcracker](https://github.com/beatcracker)
- [daurnimator](https:/github.com/daurnimator)
- [etherealjoy](https://github.com/etherealjoy)
- [jfiala](https://github.com/jfiala)
- [lukoyanov](https://github.com/lukoyanov)
- [stkrwork](https://github.com/stkrwork)
2016-12-09 07:18:55 +00:00
2016-11-04 22:16:04 +00:00
2014-09-22 23:44:01 +00:00
License
-------
Copyright 2018 OpenAPI-Generator Contributors
2018-01-04 13:56:20 +00:00
Copyright 2018 SmartBear Software
2014-09-22 23:44:01 +00:00
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at [apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
2016-02-12 20:23:27 +00:00
---
2017-03-01 15:58:33 +00:00