Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 0 additions & 57 deletions .travis.objc_swift_test.yml

This file was deleted.

3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ before_install:
- export SW=`pwd`
- rvm list
- rvm use 2.2.5
- gem environment
- gem environment
- gem install bundler -N --no-ri --no-rdoc
- gem install cocoapods -v 1.2.1 -N --no-ri --no-rdoc
- gem install xcpretty -N --no-ri --no-rdoc
Expand Down Expand Up @@ -108,4 +108,3 @@ after_success:
mvn clean deploy --settings .travis/settings.xml;
echo "Finished mvn clean deploy";
fi;

2 changes: 1 addition & 1 deletion modules/swagger-codegen-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>io.swagger</groupId>
<artifactId>swagger-codegen-project</artifactId>
<version>2.2.3-SNAPSHOT</version>
<version>2.2.3</version>
<relativePath>../..</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion modules/swagger-codegen-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.swagger</groupId>
<artifactId>swagger-codegen-project</artifactId>
<version>2.2.3-SNAPSHOT</version>
<version>2.2.3</version>
<relativePath>../..</relativePath>
</parent>
<artifactId>swagger-codegen-maven-plugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion modules/swagger-codegen/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>io.swagger</groupId>
<artifactId>swagger-codegen-project</artifactId>
<version>2.2.3-SNAPSHOT</version>
<version>2.2.3</version>
<relativePath>../..</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ public JavaClientCodegen() {
cliOptions.add(CliOption.newBoolean(USE_GZIP_FEATURE, "Send gzip-encoded requests"));
cliOptions.add(CliOption.newBoolean(USE_RUNTIME_EXCEPTION, "Use RuntimeException instead of Exception"));

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'.");
supportedLibraries.put("feign", "HTTP client: OpenFeign 9.4.0. JSON processing: Jackson 2.8.7");
supportedLibraries.put("jersey2", "HTTP client: Jersey client 2.22.2. JSON processing: Jackson 2.7.0");
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'.");
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'.");
supportedLibraries.put("feign", "HTTP client: OpenFeign 9.4.0. JSON processing: Jackson 2.8.9");
supportedLibraries.put("jersey2", "HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.8.9");
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'.");
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.");
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)");
supportedLibraries.put("resttemplate", "HTTP client: Spring RestTemplate 4.3.7-RELEASE. JSON processing: Jackson 2.8.8");
supportedLibraries.put("resteasy", "HTTP client: Resteasy client 3.0.19.Final. JSON processing: Jackson 2.7.0");
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)");
supportedLibraries.put("resttemplate", "HTTP client: Spring RestTemplate 4.3.9-RELEASE. JSON processing: Jackson 2.8.9");
supportedLibraries.put("resteasy", "HTTP client: Resteasy client 3.1.3.Final. JSON processing: Jackson 2.8.9");

CliOption libraryOption = new CliOption(CodegenConstants.LIBRARY, "library template (sub-template) to use");
libraryOption.setEnum(supportedLibraries);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,15 @@ void
{{/isContainer}}{{/bodyParams}}

{{#headerParams}}
// TODO: add header support
if ({{paramName}} != nullptr) {
input.headers.insert("{{baseName}}", "{{paramName}}");
}
{{/headerParams}}

foreach(QString key, this->defaultHeaders.keys()) {
input.headers.insert(key, this->defaultHeaders.value(key));
}

connect(worker,
&HttpRequestWorker::on_execution_finished,
this,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public:

QString host;
QString basePath;
QMap<QString, QString> defaultHeaders;

{{#operations}}{{#operation}}void {{nickname}}({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
{{/operation}}{{/operations}}
Expand Down
2 changes: 1 addition & 1 deletion modules/swagger-generator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.swagger</groupId>
<artifactId>swagger-codegen-project</artifactId>
<version>2.2.3-SNAPSHOT</version>
<version>2.2.3</version>
<relativePath>../..</relativePath>
</parent>
<artifactId>swagger-generator</artifactId>
Expand Down
9 changes: 7 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<artifactId>swagger-codegen-project</artifactId>
<packaging>pom</packaging>
<name>swagger-codegen-project</name>
<version>2.2.3-SNAPSHOT</version>
<version>2.2.3</version>
<url>https://github.com/swagger-api/swagger-codegen</url>
<scm>
<connection>scm:git:git@github.com:swagger-api/swagger-codegen.git</connection>
Expand All @@ -22,6 +22,11 @@
<name>Tony Tam</name>
<email>fehguy@gmail.com</email>
</developer>
<developer>
<id>wing328</id>
<name>William Cheng</name>
<email>wing328hk@gmail.com</email>
</developer>
</developers>
<issueManagement>
<system>github</system>
Expand Down Expand Up @@ -905,7 +910,7 @@
</repository>
</repositories>
<properties>
<swagger-parser-version>1.0.30</swagger-parser-version>
<swagger-parser-version>1.0.31</swagger-parser-version>
<scala-version>2.11.1</scala-version>
<felix-version>3.3.0</felix-version>
<swagger-core-version>1.5.15</swagger-core-version>
Expand Down
9 changes: 7 additions & 2 deletions pom.xml.circleci
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<artifactId>swagger-codegen-project</artifactId>
<packaging>pom</packaging>
<name>swagger-codegen-project</name>
<version>2.2.3-SNAPSHOT</version>
<version>2.2.3</version>
<url>https://github.com/swagger-api/swagger-codegen</url>
<scm>
<connection>scm:git:git@github.com:swagger-api/swagger-codegen.git</connection>
Expand All @@ -25,6 +25,11 @@
<name>Tony Tam</name>
<email>fehguy@gmail.com</email>
</developer>
<developer>
<id>wing328</id>
<name>William Cheng</name>
<email>wing328hk@gmail.com</email>
</developer>
</developers>
<issueManagement>
<system>github</system>
Expand Down Expand Up @@ -911,7 +916,7 @@
</repository>
</repositories>
<properties>
<swagger-parser-version>1.0.28</swagger-parser-version>
<swagger-parser-version>1.0.31</swagger-parser-version>
<scala-version>2.11.1</scala-version>
<felix-version>3.3.0</felix-version>
<swagger-core-version>1.5.15</swagger-core-version>
Expand Down
2 changes: 1 addition & 1 deletion samples/client/petstore/qt5cpp/.swagger-codegen/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.2.3-SNAPSHOT
2.2.3
36 changes: 35 additions & 1 deletion samples/client/petstore/qt5cpp/client/SWGPetApi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ SWGPetApi::addPet(SWGPet body) {



foreach(QString key, this->defaultHeaders.keys()) {
input.headers.insert(key, this->defaultHeaders.value(key));
}

connect(worker,
&HttpRequestWorker::on_execution_finished,
this,
Expand Down Expand Up @@ -86,7 +90,13 @@ SWGPetApi::deletePet(qint64 pet_id, QString* api_key) {



// TODO: add header support
if (api_key != nullptr) {
input.headers.insert("api_key", "api_key");
}

foreach(QString key, this->defaultHeaders.keys()) {
input.headers.insert(key, this->defaultHeaders.value(key));
}

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



foreach(QString key, this->defaultHeaders.keys()) {
input.headers.insert(key, this->defaultHeaders.value(key));
}

connect(worker,
&HttpRequestWorker::on_execution_finished,
this,
Expand Down Expand Up @@ -268,6 +282,10 @@ SWGPetApi::findPetsByTags(QList<QString*>* tags) {



foreach(QString key, this->defaultHeaders.keys()) {
input.headers.insert(key, this->defaultHeaders.value(key));
}

connect(worker,
&HttpRequestWorker::on_execution_finished,
this,
Expand Down Expand Up @@ -325,6 +343,10 @@ SWGPetApi::getPetById(qint64 pet_id) {



foreach(QString key, this->defaultHeaders.keys()) {
input.headers.insert(key, this->defaultHeaders.value(key));
}

connect(worker,
&HttpRequestWorker::on_execution_finished,
this,
Expand Down Expand Up @@ -371,6 +393,10 @@ SWGPetApi::updatePet(SWGPet body) {



foreach(QString key, this->defaultHeaders.keys()) {
input.headers.insert(key, this->defaultHeaders.value(key));
}

connect(worker,
&HttpRequestWorker::on_execution_finished,
this,
Expand Down Expand Up @@ -420,6 +446,10 @@ SWGPetApi::updatePetWithForm(qint64 pet_id, QString* name, QString* status) {



foreach(QString key, this->defaultHeaders.keys()) {
input.headers.insert(key, this->defaultHeaders.value(key));
}

connect(worker,
&HttpRequestWorker::on_execution_finished,
this,
Expand Down Expand Up @@ -469,6 +499,10 @@ SWGPetApi::uploadFile(qint64 pet_id, QString* additional_metadata, SWGHttpReques



foreach(QString key, this->defaultHeaders.keys()) {
input.headers.insert(key, this->defaultHeaders.value(key));
}

connect(worker,
&HttpRequestWorker::on_execution_finished,
this,
Expand Down
1 change: 1 addition & 0 deletions samples/client/petstore/qt5cpp/client/SWGPetApi.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class SWGPetApi: public QObject {

QString host;
QString basePath;
QMap<QString, QString> defaultHeaders;

void addPet(SWGPet body);
void deletePet(qint64 pet_id, QString* api_key);
Expand Down
16 changes: 16 additions & 0 deletions samples/client/petstore/qt5cpp/client/SWGStoreApi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ SWGStoreApi::deleteOrder(QString* order_id) {



foreach(QString key, this->defaultHeaders.keys()) {
input.headers.insert(key, this->defaultHeaders.value(key));
}

connect(worker,
&HttpRequestWorker::on_execution_finished,
this,
Expand Down Expand Up @@ -85,6 +89,10 @@ SWGStoreApi::getInventory() {



foreach(QString key, this->defaultHeaders.keys()) {
input.headers.insert(key, this->defaultHeaders.value(key));
}

connect(worker,
&HttpRequestWorker::on_execution_finished,
this,
Expand Down Expand Up @@ -140,6 +148,10 @@ SWGStoreApi::getOrderById(qint64 order_id) {



foreach(QString key, this->defaultHeaders.keys()) {
input.headers.insert(key, this->defaultHeaders.value(key));
}

connect(worker,
&HttpRequestWorker::on_execution_finished,
this,
Expand Down Expand Up @@ -186,6 +198,10 @@ SWGStoreApi::placeOrder(SWGOrder body) {



foreach(QString key, this->defaultHeaders.keys()) {
input.headers.insert(key, this->defaultHeaders.value(key));
}

connect(worker,
&HttpRequestWorker::on_execution_finished,
this,
Expand Down
1 change: 1 addition & 0 deletions samples/client/petstore/qt5cpp/client/SWGStoreApi.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class SWGStoreApi: public QObject {

QString host;
QString basePath;
QMap<QString, QString> defaultHeaders;

void deleteOrder(QString* order_id);
void getInventory();
Expand Down
Loading