Skip to content

Commit 34e94fb

Browse files
authored
Updated versions for 2.2.3 release and other minor enhancements (swagger-api#6070)
* update pom to prepare 2.2.3 release * add header support to qt5, update samples * update version in java help * update to xcode 9 * rollback to xcode8.2
1 parent ff04f53 commit 34e94fb

File tree

16 files changed

+113
-76
lines changed

16 files changed

+113
-76
lines changed

.travis.objc_swift_test.yml

Lines changed: 0 additions & 57 deletions
This file was deleted.

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ before_install:
3636
- export SW=`pwd`
3737
- rvm list
3838
- rvm use 2.2.5
39-
- gem environment
39+
- gem environment
4040
- gem install bundler -N --no-ri --no-rdoc
4141
- gem install cocoapods -v 1.2.1 -N --no-ri --no-rdoc
4242
- gem install xcpretty -N --no-ri --no-rdoc
@@ -108,4 +108,3 @@ after_success:
108108
mvn clean deploy --settings .travis/settings.xml;
109109
echo "Finished mvn clean deploy";
110110
fi;
111-

modules/swagger-codegen-cli/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<parent>
44
<groupId>io.swagger</groupId>
55
<artifactId>swagger-codegen-project</artifactId>
6-
<version>2.2.3-SNAPSHOT</version>
6+
<version>2.2.3</version>
77
<relativePath>../..</relativePath>
88
</parent>
99
<modelVersion>4.0.0</modelVersion>

modules/swagger-codegen-maven-plugin/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>io.swagger</groupId>
88
<artifactId>swagger-codegen-project</artifactId>
9-
<version>2.2.3-SNAPSHOT</version>
9+
<version>2.2.3</version>
1010
<relativePath>../..</relativePath>
1111
</parent>
1212
<artifactId>swagger-codegen-maven-plugin</artifactId>

modules/swagger-codegen/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<parent>
44
<groupId>io.swagger</groupId>
55
<artifactId>swagger-codegen-project</artifactId>
6-
<version>2.2.3-SNAPSHOT</version>
6+
<version>2.2.3</version>
77
<relativePath>../..</relativePath>
88
</parent>
99
<modelVersion>4.0.0</modelVersion>

modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavaClientCodegen.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@ public JavaClientCodegen() {
6262
cliOptions.add(CliOption.newBoolean(USE_GZIP_FEATURE, "Send gzip-encoded requests"));
6363
cliOptions.add(CliOption.newBoolean(USE_RUNTIME_EXCEPTION, "Use RuntimeException instead of Exception"));
6464

65-
supportedLibraries.put("jersey1", "HTTP client: Jersey client 1.19.1. JSON processing: Jackson 2.7.0. Enable Java6 support using '-DsupportJava6=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.");
66-
supportedLibraries.put("feign", "HTTP client: OpenFeign 9.4.0. JSON processing: Jackson 2.8.7");
67-
supportedLibraries.put("jersey2", "HTTP client: Jersey client 2.22.2. JSON processing: Jackson 2.7.0");
68-
supportedLibraries.put("okhttp-gson", "HTTP client: OkHttp 2.7.5. JSON processing: Gson 2.6.2. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.");
65+
supportedLibraries.put("jersey1", "HTTP client: Jersey client 1.19.4. JSON processing: Jackson 2.8.9. Enable Java6 support using '-DsupportJava6=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.");
66+
supportedLibraries.put("feign", "HTTP client: OpenFeign 9.4.0. JSON processing: Jackson 2.8.9");
67+
supportedLibraries.put("jersey2", "HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.8.9");
68+
supportedLibraries.put("okhttp-gson", "HTTP client: OkHttp 2.7.5. JSON processing: Gson 2.8.1. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.");
6969
supportedLibraries.put(RETROFIT_1, "HTTP client: OkHttp 2.7.5. JSON processing: Gson 2.3.1 (Retrofit 1.9.0). IMPORTANT NOTE: retrofit1.x is no longer actively maintained so please upgrade to 'retrofit2' instead.");
70-
supportedLibraries.put(RETROFIT_2, "HTTP client: OkHttp 3.2.0. JSON processing: Gson 2.6.1 (Retrofit 2.0.2). Enable the RxJava adapter using '-DuseRxJava[2]=true'. (RxJava 1.x or 2.x)");
71-
supportedLibraries.put("resttemplate", "HTTP client: Spring RestTemplate 4.3.7-RELEASE. JSON processing: Jackson 2.8.8");
72-
supportedLibraries.put("resteasy", "HTTP client: Resteasy client 3.0.19.Final. JSON processing: Jackson 2.7.0");
70+
supportedLibraries.put(RETROFIT_2, "HTTP client: OkHttp 3.8.0. JSON processing: Gson 2.6.1 (Retrofit 2.3.0). Enable the RxJava adapter using '-DuseRxJava[2]=true'. (RxJava 1.x or 2.x)");
71+
supportedLibraries.put("resttemplate", "HTTP client: Spring RestTemplate 4.3.9-RELEASE. JSON processing: Jackson 2.8.9");
72+
supportedLibraries.put("resteasy", "HTTP client: Resteasy client 3.1.3.Final. JSON processing: Jackson 2.8.9");
7373

7474
CliOption libraryOption = new CliOption(CodegenConstants.LIBRARY, "library template (sub-template) to use");
7575
libraryOption.setEnum(supportedLibraries);

modules/swagger-generator/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>io.swagger</groupId>
66
<artifactId>swagger-codegen-project</artifactId>
7-
<version>2.2.3-SNAPSHOT</version>
7+
<version>2.2.3</version>
88
<relativePath>../..</relativePath>
99
</parent>
1010
<artifactId>swagger-generator</artifactId>

pom.xml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<artifactId>swagger-codegen-project</artifactId>
1010
<packaging>pom</packaging>
1111
<name>swagger-codegen-project</name>
12-
<version>2.2.3-SNAPSHOT</version>
12+
<version>2.2.3</version>
1313
<url>https://github.com/swagger-api/swagger-codegen</url>
1414
<scm>
1515
<connection>scm:git:[email protected]:swagger-api/swagger-codegen.git</connection>
@@ -22,6 +22,11 @@
2222
<name>Tony Tam</name>
2323
<email>[email protected]</email>
2424
</developer>
25+
<developer>
26+
<id>wing328</id>
27+
<name>William Cheng</name>
28+
<email>[email protected]</email>
29+
</developer>
2530
</developers>
2631
<issueManagement>
2732
<system>github</system>
@@ -905,7 +910,7 @@
905910
</repository>
906911
</repositories>
907912
<properties>
908-
<swagger-parser-version>1.0.30</swagger-parser-version>
913+
<swagger-parser-version>1.0.31</swagger-parser-version>
909914
<scala-version>2.11.1</scala-version>
910915
<felix-version>3.3.0</felix-version>
911916
<swagger-core-version>1.5.15</swagger-core-version>

pom.xml.circleci

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<artifactId>swagger-codegen-project</artifactId>
1010
<packaging>pom</packaging>
1111
<name>swagger-codegen-project</name>
12-
<version>2.2.3-SNAPSHOT</version>
12+
<version>2.2.3</version>
1313
<url>https://github.com/swagger-api/swagger-codegen</url>
1414
<scm>
1515
<connection>scm:git:[email protected]:swagger-api/swagger-codegen.git</connection>
@@ -25,6 +25,11 @@
2525
<name>Tony Tam</name>
2626
<email>[email protected]</email>
2727
</developer>
28+
<developer>
29+
<id>wing328</id>
30+
<name>William Cheng</name>
31+
<email>[email protected]</email>
32+
</developer>
2833
</developers>
2934
<issueManagement>
3035
<system>github</system>
@@ -911,7 +916,7 @@
911916
</repository>
912917
</repositories>
913918
<properties>
914-
<swagger-parser-version>1.0.28</swagger-parser-version>
919+
<swagger-parser-version>1.0.31</swagger-parser-version>
915920
<scala-version>2.11.1</scala-version>
916921
<felix-version>3.3.0</felix-version>
917922
<swagger-core-version>1.5.15</swagger-core-version>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.2.3-SNAPSHOT
1+
2.2.3

samples/client/petstore/qt5cpp/client/SWGPetApi.cpp

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ SWGPetApi::addPet(SWGPet body) {
4444

4545

4646

47+
foreach(QString key, this->defaultHeaders.keys()) {
48+
input.headers.insert(key, this->defaultHeaders.value(key));
49+
}
50+
4751
connect(worker,
4852
&HttpRequestWorker::on_execution_finished,
4953
this,
@@ -86,7 +90,13 @@ SWGPetApi::deletePet(qint64 pet_id, QString* api_key) {
8690

8791

8892

89-
// TODO: add header support
93+
if (api_key != nullptr) {
94+
input.headers.insert("api_key", "api_key");
95+
}
96+
97+
foreach(QString key, this->defaultHeaders.keys()) {
98+
input.headers.insert(key, this->defaultHeaders.value(key));
99+
}
90100

91101
connect(worker,
92102
&HttpRequestWorker::on_execution_finished,
@@ -171,6 +181,10 @@ SWGPetApi::findPetsByStatus(QList<QString*>* status) {
171181

172182

173183

184+
foreach(QString key, this->defaultHeaders.keys()) {
185+
input.headers.insert(key, this->defaultHeaders.value(key));
186+
}
187+
174188
connect(worker,
175189
&HttpRequestWorker::on_execution_finished,
176190
this,
@@ -268,6 +282,10 @@ SWGPetApi::findPetsByTags(QList<QString*>* tags) {
268282

269283

270284

285+
foreach(QString key, this->defaultHeaders.keys()) {
286+
input.headers.insert(key, this->defaultHeaders.value(key));
287+
}
288+
271289
connect(worker,
272290
&HttpRequestWorker::on_execution_finished,
273291
this,
@@ -325,6 +343,10 @@ SWGPetApi::getPetById(qint64 pet_id) {
325343

326344

327345

346+
foreach(QString key, this->defaultHeaders.keys()) {
347+
input.headers.insert(key, this->defaultHeaders.value(key));
348+
}
349+
328350
connect(worker,
329351
&HttpRequestWorker::on_execution_finished,
330352
this,
@@ -371,6 +393,10 @@ SWGPetApi::updatePet(SWGPet body) {
371393

372394

373395

396+
foreach(QString key, this->defaultHeaders.keys()) {
397+
input.headers.insert(key, this->defaultHeaders.value(key));
398+
}
399+
374400
connect(worker,
375401
&HttpRequestWorker::on_execution_finished,
376402
this,
@@ -420,6 +446,10 @@ SWGPetApi::updatePetWithForm(qint64 pet_id, QString* name, QString* status) {
420446

421447

422448

449+
foreach(QString key, this->defaultHeaders.keys()) {
450+
input.headers.insert(key, this->defaultHeaders.value(key));
451+
}
452+
423453
connect(worker,
424454
&HttpRequestWorker::on_execution_finished,
425455
this,
@@ -469,6 +499,10 @@ SWGPetApi::uploadFile(qint64 pet_id, QString* additional_metadata, SWGHttpReques
469499

470500

471501

502+
foreach(QString key, this->defaultHeaders.keys()) {
503+
input.headers.insert(key, this->defaultHeaders.value(key));
504+
}
505+
472506
connect(worker,
473507
&HttpRequestWorker::on_execution_finished,
474508
this,

samples/client/petstore/qt5cpp/client/SWGPetApi.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ class SWGPetApi: public QObject {
3434

3535
QString host;
3636
QString basePath;
37+
QMap<QString, QString> defaultHeaders;
3738

3839
void addPet(SWGPet body);
3940
void deletePet(qint64 pet_id, QString* api_key);

samples/client/petstore/qt5cpp/client/SWGStoreApi.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ SWGStoreApi::deleteOrder(QString* order_id) {
4444

4545

4646

47+
foreach(QString key, this->defaultHeaders.keys()) {
48+
input.headers.insert(key, this->defaultHeaders.value(key));
49+
}
50+
4751
connect(worker,
4852
&HttpRequestWorker::on_execution_finished,
4953
this,
@@ -85,6 +89,10 @@ SWGStoreApi::getInventory() {
8589

8690

8791

92+
foreach(QString key, this->defaultHeaders.keys()) {
93+
input.headers.insert(key, this->defaultHeaders.value(key));
94+
}
95+
8896
connect(worker,
8997
&HttpRequestWorker::on_execution_finished,
9098
this,
@@ -140,6 +148,10 @@ SWGStoreApi::getOrderById(qint64 order_id) {
140148

141149

142150

151+
foreach(QString key, this->defaultHeaders.keys()) {
152+
input.headers.insert(key, this->defaultHeaders.value(key));
153+
}
154+
143155
connect(worker,
144156
&HttpRequestWorker::on_execution_finished,
145157
this,
@@ -186,6 +198,10 @@ SWGStoreApi::placeOrder(SWGOrder body) {
186198

187199

188200

201+
foreach(QString key, this->defaultHeaders.keys()) {
202+
input.headers.insert(key, this->defaultHeaders.value(key));
203+
}
204+
189205
connect(worker,
190206
&HttpRequestWorker::on_execution_finished,
191207
this,

samples/client/petstore/qt5cpp/client/SWGStoreApi.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class SWGStoreApi: public QObject {
3333

3434
QString host;
3535
QString basePath;
36+
QMap<QString, QString> defaultHeaders;
3637

3738
void deleteOrder(QString* order_id);
3839
void getInventory();

0 commit comments

Comments
 (0)