Skip to content

Commit ca82581

Browse files
authored
Merge branch 'master' into python-auth
2 parents d5c5474 + 6a9830b commit ca82581

File tree

1,821 files changed

+123025
-17950
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,821 files changed

+123025
-17950
lines changed

.java-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
oracle64-1.8.0.152
1+
1.8

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
sudo: required
22
language: java
3+
dist: trusty
34
jdk:
4-
- openjdk7
5+
- openjdk8
56

67
cache:
78
directories:

.travis.yml.bash

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
sudo: required
22
language: java
3+
dist: trusty
34
jdk:
45
- openjdk8
56

.travis.yml.ios

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
sudo: required
22
language: objective-c
3+
dist: trusty
34
osx_image: xcode8.1
45
cache:
56
directories:

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM jimschubert/8-jdk-alpine-mvn:1.0
1+
FROM maven:3-jdk-8-alpine
22

33
RUN set -x && \
44
apk add --no-cache bash
@@ -18,6 +18,7 @@ COPY ./google_checkstyle.xml ${GEN_DIR}
1818
COPY ./modules/swagger-codegen-maven-plugin ${GEN_DIR}/modules/swagger-codegen-maven-plugin
1919
COPY ./modules/swagger-codegen-cli ${GEN_DIR}/modules/swagger-codegen-cli
2020
COPY ./modules/swagger-codegen ${GEN_DIR}/modules/swagger-codegen
21+
COPY ./modules/swagger-generator ${GEN_DIR}/modules/swagger-generator
2122
COPY ./pom.xml ${GEN_DIR}
2223

2324
# Pre-compile swagger-codegen-cli

README.md

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66

77
[![Build Status](https://jenkins.swagger.io/view/OSS%20-%20Java/job/oss-swagger-codegen-master-java7/badge/icon?subject=jenkins%20build%20-%20java%207)](https://jenkins.swagger.io/view/OSS%20-%20Java/job/oss-swagger-codegen-master-java7/)
88

9-
- Master (2.4.7): [![Build Status](https://img.shields.io/travis/swagger-api/swagger-codegen/master.svg?label=Petstore%20Integration%20Test)](https://travis-ci.org/swagger-api/swagger-codegen)
9+
- Master (2.4.11-SNAPSHOT): [![Build Status](https://img.shields.io/travis/swagger-api/swagger-codegen/master.svg?label=Petstore%20Integration%20Test)](https://travis-ci.org/swagger-api/swagger-codegen)
1010
[![Java Test](https://img.shields.io/jenkins/s/https/jenkins.swagger.io/view/OSS%20-%20Java/job/oss-swagger-codegen-master.svg)](https://jenkins.swagger.io/view/OSS%20-%20Java/job/oss-swagger-codegen-master)
1111
[![Windows Test](https://ci.appveyor.com/api/projects/status/github/swagger-api/swagger-codegen?branch=master&svg=true&passingText=Windows%20Test%20-%20OK&failingText=Windows%20Test%20-%20Fails)](https://ci.appveyor.com/project/swaggerhub-bot/swagger-codegen)
12-
- 3.0.0: [![Build Status](https://img.shields.io/travis/swagger-api/swagger-codegen/3.0.0.svg?label=Petstore%20Integration%20Test)](https://travis-ci.org/swagger-api/swagger-codegen)
12+
- 3.0.15-SNAPSHOT: [![Build Status](https://img.shields.io/travis/swagger-api/swagger-codegen/3.0.0.svg?label=Petstore%20Integration%20Test)](https://travis-ci.org/swagger-api/swagger-codegen)
1313
[![Java Test](https://img.shields.io/jenkins/s/https/jenkins.swagger.io/view/OSS%20-%20Java/job/oss-swagger-codegen-3.svg)](https://jenkins.swagger.io/view/OSS%20-%20Java/job/oss-swagger-codegen-3)
1414
[![Windows Test](https://ci.appveyor.com/api/projects/status/github/swagger-api/swagger-codegen?branch=3.0.0&svg=true&passingText=Windows%20Test%20-%20OK&failingText=Windows%20Test%20-%20Fails)](https://ci.appveyor.com/project/swaggerhub-bot/swagger-codegen)
1515

@@ -51,7 +51,7 @@ dependency example:
5151
<dependency>
5252
<groupId>io.swagger</groupId>
5353
<artifactId>swagger-codegen-maven-plugin</artifactId>
54-
<version>2.4.7</version>
54+
<version>2.4.10</version>
5555
</dependency>
5656
```
5757

@@ -69,7 +69,7 @@ dependency example:
6969
<dependency>
7070
<groupId>io.swagger.codegen.v3</groupId>
7171
<artifactId>swagger-codegen-maven-plugin</artifactId>
72-
<version>3.0.10</version>
72+
<version>3.0.14</version>
7373
</dependency>
7474
```
7575

@@ -78,7 +78,7 @@ dependency example:
7878
## Overview
7979
This is the Swagger Codegen project, which allows generation of API client libraries (SDK generation), server stubs and documentation automatically given an [OpenAPI Spec](https://github.com/OAI/OpenAPI-Specification). Currently, the following languages/frameworks are supported:
8080

81-
- **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)
81+
- **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, 5.x), **Typescript** (Angular1.x, Angular2.x, Fetch, jQuery, Node)
8282
- **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)
8383
- **API documentation generators**: **HTML**, **Confluence Wiki**
8484
- **Configuration files**: [**Apache2**](https://httpd.apache.org/)
@@ -99,7 +99,7 @@ Check out [OpenAPI-Spec](https://github.com/OAI/OpenAPI-Specification) for addit
9999
- [Docker](#docker)
100100
- [Development in Docker](#development-in-docker)
101101
- [Run docker in Vagrant](#run-docker-in-vagrant)
102-
- [Public Docker image](#public-docker-image)
102+
- [Public pre-built Docker images](#public-pre-built-docker-images)
103103
- [Homebrew](#homebrew)
104104
- [Getting Started](#getting-started)
105105
- Generators
@@ -133,8 +133,12 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20
133133

134134
Swagger Codegen Version | Release Date | OpenAPI Spec compatibility | Notes
135135
-------------------------- | ------------ | -------------------------- | -----
136-
3.0.11-SNAPSHOT (current 3.0.0, upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/io/swagger/codegen/v3/swagger-codegen-cli/3.0.11-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Minor release
137-
[3.0.10](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.10) (**current stable**) | 2019-07-11 | 1.0, 1.1, 1.2, 2.0, 3.0 | [tag v3.0.10](https://github.com/swagger-api/swagger-codegen/tree/v3.0.10)
136+
3.0.15-SNAPSHOT (current 3.0.0, upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/io/swagger/codegen/v3/swagger-codegen-cli/3.0.15-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Minor release
137+
[3.0.14](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.14) (**current stable**) | 2019-11-16 | 1.0, 1.1, 1.2, 2.0, 3.0 | [tag v3.0.14](https://github.com/swagger-api/swagger-codegen/tree/v3.0.14)
138+
[3.0.13](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.13) | 2019-10-16 | 1.0, 1.1, 1.2, 2.0, 3.0 | [tag v3.0.13](https://github.com/swagger-api/swagger-codegen/tree/v3.0.13)
139+
[3.0.12](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.12) | 2019-10-14 | 1.0, 1.1, 1.2, 2.0, 3.0 | [tag v3.0.12](https://github.com/swagger-api/swagger-codegen/tree/v3.0.12)
140+
[3.0.11](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.11) | 2019-08-24 | 1.0, 1.1, 1.2, 2.0, 3.0 | [tag v3.0.11](https://github.com/swagger-api/swagger-codegen/tree/v3.0.11)
141+
[3.0.10](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.10) | 2019-07-11 | 1.0, 1.1, 1.2, 2.0, 3.0 | [tag v3.0.10](https://github.com/swagger-api/swagger-codegen/tree/v3.0.10)
138142
[3.0.9](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.9) | 2019-06-28 | 1.0, 1.1, 1.2, 2.0, 3.0 | [tag v3.0.9](https://github.com/swagger-api/swagger-codegen/tree/v3.0.9)
139143
[3.0.8](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.8) | 2019-04-25 | 1.0, 1.1, 1.2, 2.0, 3.0 | [tag v3.0.8](https://github.com/swagger-api/swagger-codegen/tree/v3.0.8)
140144
[3.0.7](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.7) | 2019-03-26 | 1.0, 1.1, 1.2, 2.0, 3.0 | [tag v3.0.7](https://github.com/swagger-api/swagger-codegen/tree/v3.0.7)
@@ -144,8 +148,11 @@ Swagger Codegen Version | Release Date | OpenAPI Spec compatibility | Notes
144148
[3.0.2](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.2)| 2018-10-19 | 1.0, 1.1, 1.2, 2.0, 3.0 | Minor release
145149
[3.0.1](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.1)| 2018-10-05 | 1.0, 1.1, 1.2, 2.0, 3.0 | Major release with breaking changes
146150
[3.0.0](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.0)| 2018-09-06 | 1.0, 1.1, 1.2, 2.0, 3.0 | Major release with breaking changes
147-
2.4.8-SNAPSHOT (current master, upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/io/swagger/swagger-codegen-cli/2.4.8-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0 | Minor release
148-
[2.4.7](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.4.7) (**current stable**) | 2019-07-11 | 1.0, 1.1, 1.2, 2.0 | [tag v2.4.7](https://github.com/swagger-api/swagger-codegen/tree/v2.4.7)
151+
2.4.11-SNAPSHOT (current master, upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/io/swagger/swagger-codegen-cli/2.4.11-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0 | Minor release
152+
[2.4.10](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.4.10) (**current stable**) | 2019-11-16 | 1.0, 1.1, 1.2, 2.0 | [tag v2.4.10](https://github.com/swagger-api/swagger-codegen/tree/v2.4.10)
153+
[2.4.9](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.4.9) | 2019-10-14 | 1.0, 1.1, 1.2, 2.0 | [tag v2.4.9](https://github.com/swagger-api/swagger-codegen/tree/v2.4.9)
154+
[2.4.8](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.4.8) | 2019-08-24 | 1.0, 1.1, 1.2, 2.0 | [tag v2.4.8](https://github.com/swagger-api/swagger-codegen/tree/v2.4.8)
155+
[2.4.7](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.4.7) | 2019-07-11 | 1.0, 1.1, 1.2, 2.0 | [tag v2.4.7](https://github.com/swagger-api/swagger-codegen/tree/v2.4.7)
149156
[2.4.6](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.4.6) | 2019-06-28 | 1.0, 1.1, 1.2, 2.0 | [tag v2.4.6](https://github.com/swagger-api/swagger-codegen/tree/v2.4.6)
150157
[2.4.5](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.4.5) | 2019-04-25 | 1.0, 1.1, 1.2, 2.0 | [tag v2.4.5](https://github.com/swagger-api/swagger-codegen/tree/v2.4.5)
151158
[2.4.4](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.4.4) | 2019-03-26 | 1.0, 1.1, 1.2, 2.0 | [tag v2.4.4](https://github.com/swagger-api/swagger-codegen/tree/v2.4.4)
@@ -162,16 +169,17 @@ Swagger Codegen Version | Release Date | OpenAPI Spec compatibility | Notes
162169
1.0.4 | 2012-04-12 | 1.0, 1.1 | [tag v1.0.4](https://github.com/swagger-api/swagger-codegen/tree/swagger-codegen_2.9.1-1.1)
163170

164171

172+
165173
### Prerequisites
166-
If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 7 runtime at a minimum):
174+
If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 8 runtime at a minimum):
167175

168176
```sh
169-
wget http://central.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.7/swagger-codegen-cli-2.4.7.jar -O swagger-codegen-cli.jar
177+
wget http://central.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.10/swagger-codegen-cli-2.4.10.jar -O swagger-codegen-cli.jar
170178

171179
java -jar swagger-codegen-cli.jar help
172180
```
173181

174-
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 swagger-codegen-cli.jar http://central.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.7/swagger-codegen-cli-2.4.7.jar`
182+
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 swagger-codegen-cli.jar http://central.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.10/swagger-codegen-cli-2.4.10.jar`
175183

176184
On a mac, it's even easier with `brew`:
177185
```sh
@@ -180,12 +188,12 @@ brew install swagger-codegen
180188

181189
To build from source, you need the following installed and available in your `$PATH:`
182190

183-
* [Java 7 or 8](http://java.oracle.com)
191+
* [Java 8+](http://java.oracle.com)
184192

185193
* [Apache maven 3.3.3 or greater](http://maven.apache.org/)
186194

187195
#### OS X Users
188-
Don't forget to install Java 7 or 8. You probably have 1.6.
196+
Don't forget to install Java 8+.
189197

190198
Export `JAVA_HOME` in order to use the supported Java version:
191199
```sh
@@ -316,7 +324,7 @@ java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate \
316324
```
317325
(if you're on Windows, replace the last command with `java -jar modules\swagger-codegen-cli\target\swagger-codegen-cli.jar generate -i http://petstore.swagger.io/v2/swagger.json -l php -o c:\temp\php_api_client`)
318326

319-
You can also download the JAR (latest release) directly from [maven.org](http://central.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.7/swagger-codegen-cli-2.4.7.jar)
327+
You can also download the JAR (latest release) directly from [maven.org](http://central.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.10/swagger-codegen-cli-2.4.10.jar)
320328

321329
To get a list of **general** options available, please run `java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar help generate`
322330

bin/java-petstore-resteasy-all.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
./bin/jaxrs-resteasy-eap-petstore-server.sh
55
./bin/jaxrs-resteasy-eap-java8-petstore-server.sh
66
./bin/jaxrs-resteasy-joda-petstore-server.sh
7+
./bin/jaxrs-resteasy-java8-petstore-server.sh
78
./bin/jaxrs-resteasy-eap-joda-petstore-server.sh
89
./bin/jaxrs-resteasy-petstore-server.sh*
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/bin/sh
2+
3+
SCRIPT="$0"
4+
echo "# START SCRIPT: $SCRIPT"
5+
6+
while [ -h "$SCRIPT" ] ; do
7+
ls=`ls -ld "$SCRIPT"`
8+
link=`expr "$ls" : '.*-> \(.*\)$'`
9+
if expr "$link" : '/.*' > /dev/null; then
10+
SCRIPT="$link"
11+
else
12+
SCRIPT=`dirname "$SCRIPT"`/"$link"
13+
fi
14+
done
15+
16+
if [ ! -d "${APP_DIR}" ]; then
17+
APP_DIR=`dirname "$SCRIPT"`/..
18+
APP_DIR=`cd "${APP_DIR}"; pwd`
19+
fi
20+
21+
executable="./modules/swagger-codegen-cli/target/swagger-codegen-cli.jar"
22+
23+
if [ ! -f "$executable" ]
24+
then
25+
mvn -B clean package
26+
fi
27+
28+
# if you've executed sbt assembly previously it will use that instead.
29+
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
30+
ags="generate \
31+
-t modules/swagger-codegen/src/main/resources/Javascript \
32+
-i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml \
33+
-l javascript \
34+
-o samples/client/petstore/javascript-override-default-config \
35+
--invoker-package petstore \
36+
--api-package handler \
37+
--model-package mdl \
38+
--additional-properties sourceFolder=js \
39+
-DappName=PetstoreClient $@"
40+
41+
java $JAVA_OPTS -jar $executable $ags

bin/javascript-petstore-all.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
./bin/javascript-promise-petstore.sh
55
./bin/javascript-es6-petstore.sh
66
./bin/javascript-promise-es6-petstore.sh
7+
./bin/javascript-override-default-config-petstore.sh
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"dateLibrary": "java8"
3+
}

0 commit comments

Comments
 (0)