Skip to content

Commit 865dfa5

Browse files
authored
Merge branch 'master' into fix_issue_9250
2 parents 5beba62 + d3355db commit 865dfa5

File tree

1,893 files changed

+132755
-21495
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,893 files changed

+132755
-21495
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:

README.md

Lines changed: 37 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@
22

33
[![Build Status](https://img.shields.io/jenkins/s/https/jenkins.swagger.io/view/OSS%20-%20Java/job/oss-swagger-core-master-java-8.svg)](https://jenkins.swagger.io/view/OSS%20-%20Java/job/oss-swagger-core-master-java-8)
44

5-
- Master (2.4.5): [![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)
5+
[![Build Status](https://jenkins.swagger.io/view/OSS%20-%20Java/job/oss-swagger-codegen-master/badge/icon?subject=jenkins%20build)](https://jenkins.swagger.io/view/OSS%20-%20Java/job/oss-swagger-codegen-master/)
6+
7+
[![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/)
8+
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)
610
[![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)
711
[![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)
8-
- 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)
913
[![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)
1014
[![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)
1115

@@ -47,7 +51,7 @@ dependency example:
4751
<dependency>
4852
<groupId>io.swagger</groupId>
4953
<artifactId>swagger-codegen-maven-plugin</artifactId>
50-
<version>2.4.5</version>
54+
<version>2.4.10</version>
5155
</dependency>
5256
```
5357

@@ -65,7 +69,7 @@ dependency example:
6569
<dependency>
6670
<groupId>io.swagger.codegen.v3</groupId>
6771
<artifactId>swagger-codegen-maven-plugin</artifactId>
68-
<version>3.0.8</version>
72+
<version>3.0.14</version>
6973
</dependency>
7074
```
7175

@@ -129,17 +133,28 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20
129133

130134
Swagger Codegen Version | Release Date | OpenAPI Spec compatibility | Notes
131135
-------------------------- | ------------ | -------------------------- | -----
132-
3.0.9-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.9-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Minor release
133-
[3.0.8](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.8) (**current stable**) | 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)
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)
142+
[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)
143+
[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)
134144
[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)
135145
[3.0.5](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.5) | 2019-02-18 | 1.0, 1.1, 1.2, 2.0, 3.0 | [tag v3.0.5](https://github.com/swagger-api/swagger-codegen/tree/v3.0.5)
136146
[3.0.4](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.4) | 2019-01-16 | 1.0, 1.1, 1.2, 2.0, 3.0 | [tag v3.0.4](https://github.com/swagger-api/swagger-codegen/tree/v3.0.4)
137147
[3.0.3](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.3) | 2018-11-30 | 1.0, 1.1, 1.2, 2.0, 3.0 | [tag v3.0.3](https://github.com/swagger-api/swagger-codegen/tree/v3.0.3)
138148
[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
139149
[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
140150
[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
141-
2.4.6-SNAPSHOT (current master, upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/io/swagger/swagger-codegen-cli/2.4.6-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0 | Minor release
142-
[2.4.5](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.4.5) (**current stable**) | 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)
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)
156+
[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)
157+
[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)
143158
[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)
144159
[2.4.2](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.4.2) | 2019-02-18 | 1.0, 1.1, 1.2, 2.0 | [tag v2.4.2](https://github.com/swagger-api/swagger-codegen/tree/v2.4.2)
145160
[2.4.1](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.4.1) | 2019-01-16 | 1.0, 1.1, 1.2, 2.0 | [tag v2.4.1](https://github.com/swagger-api/swagger-codegen/tree/v2.4.1)
@@ -154,16 +169,17 @@ Swagger Codegen Version | Release Date | OpenAPI Spec compatibility | Notes
154169
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)
155170

156171

172+
157173
### Prerequisites
158-
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):
159175

160176
```sh
161-
wget http://central.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.5/swagger-codegen-cli-2.4.5.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
162178

163179
java -jar swagger-codegen-cli.jar help
164180
```
165181

166-
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.5/swagger-codegen-cli-2.4.5.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`
167183

168184
On a mac, it's even easier with `brew`:
169185
```sh
@@ -172,12 +188,12 @@ brew install swagger-codegen
172188

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

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

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

179195
#### OS X Users
180-
Don't forget to install Java 7 or 8. You probably have 1.6.
196+
Don't forget to install Java 8+.
181197

182198
Export `JAVA_HOME` in order to use the supported Java version:
183199
```sh
@@ -308,7 +324,7 @@ java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate \
308324
```
309325
(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`)
310326

311-
You can also download the JAR (latest release) directly from [maven.org](http://central.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.5/swagger-codegen-cli-2.4.5.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)
312328

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

@@ -1168,6 +1184,9 @@ Who is eligible? Those who want to join must have at least 3 PRs merged into a g
11681184
| Swift | @ehyche (2017/08) |
11691185
| TypeScript | |
11701186

1187+
# Security contact
1188+
1189+
Please disclose any security-related issues or vulnerabilities by emailing [[email protected]](mailto:[email protected]), instead of using the public issue tracker.
11711190

11721191
# License information on Generated Code
11731192

@@ -1178,10 +1197,10 @@ The Swagger Codegen project is intended as a benefit for users of the Swagger /
11781197

11791198
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.
11801199

1181-
License
1182-
-------
1200+
# License
11831201

1184-
Copyright 2018 SmartBear Software
1202+
```
1203+
Copyright 2019 SmartBear Software
11851204
11861205
Licensed under the Apache License, Version 2.0 (the "License");
11871206
you may not use this file except in compliance with the License.
@@ -1192,3 +1211,4 @@ distributed under the License is distributed on an "AS IS" BASIS,
11921211
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11931212
See the License for the specific language governing permissions and
11941213
limitations under the License.
1214+
```
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/usr/bin/env bash
2+
3+
SCRIPT="$0"
4+
5+
while [ -h "$SCRIPT" ] ; do
6+
ls=`ls -ld "$SCRIPT"`
7+
link=`expr "$ls" : '.*-> \(.*\)$'`
8+
if expr "$link" : '/.*' > /dev/null; then
9+
SCRIPT="$link"
10+
else
11+
SCRIPT=`dirname "$SCRIPT"`/"$link"
12+
fi
13+
done
14+
15+
if [ ! -d "${APP_DIR}" ]; then
16+
APP_DIR=`dirname "$SCRIPT"`/..
17+
APP_DIR=`cd "${APP_DIR}"; pwd`
18+
fi
19+
20+
executable="./modules/swagger-codegen-cli/target/swagger-codegen-cli.jar"
21+
22+
if [ ! -f "$executable" ]
23+
then
24+
mvn clean package
25+
fi
26+
27+
# if you've executed sbt assembly previously it will use that instead.
28+
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
29+
ags="$@ generate -l aspnetcore -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -o samples/server/petstore/aspnetcore-interface-controller --additional-properties packageGuid={3C799344-F285-4669-8FD5-7ED9B795D5C5} --additional-properties interface-controller=true"
30+
31+
java $JAVA_OPTS -jar $executable $ags
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/usr/bin/env bash
2+
3+
SCRIPT="$0"
4+
5+
while [ -h "$SCRIPT" ] ; do
6+
ls=`ls -ld "$SCRIPT"`
7+
link=`expr "$ls" : '.*-> \(.*\)$'`
8+
if expr "$link" : '/.*' > /dev/null; then
9+
SCRIPT="$link"
10+
else
11+
SCRIPT=`dirname "$SCRIPT"`/"$link"
12+
fi
13+
done
14+
15+
if [ ! -d "${APP_DIR}" ]; then
16+
APP_DIR=`dirname "$SCRIPT"`/..
17+
APP_DIR=`cd "${APP_DIR}"; pwd`
18+
fi
19+
20+
executable="./modules/swagger-codegen-cli/target/swagger-codegen-cli.jar"
21+
22+
if [ ! -f "$executable" ]
23+
then
24+
mvn clean package
25+
fi
26+
27+
# if you've executed sbt assembly previously it will use that instead.
28+
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
29+
ags="$@ generate -l aspnetcore -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -o samples/server/petstore/aspnetcore-interface-only --additional-properties packageGuid={3C799344-F285-4669-8FD5-7ED9B795D5C5} --additional-properties interface-only=true"
30+
31+
java $JAVA_OPTS -jar $executable $ags

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

0 commit comments

Comments
 (0)