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
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ void
}
}
{{/collectionFormat}}{{/queryParams}}
{{prefix}}HttpRequestWorker *worker = new {{prefix}}HttpRequestWorker();
{{prefix}}HttpRequestWorker *worker = new {{prefix}}HttpRequestWorker(this);
worker->setTimeOut(timeout);
{{prefix}}HttpRequestInput input(fullPath, "{{httpMethod}}");
{{#formParams}}
Expand Down
16 changes: 8 additions & 8 deletions samples/client/petstore/cpp-qt5/client/OAIPetApi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ OAIPetApi::addPet(const OAIPet& body) {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/pet");

OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker(this);
worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "POST");

Expand Down Expand Up @@ -108,7 +108,7 @@ OAIPetApi::deletePet(const qint64& pet_id, const QString& api_key) {
pet_idPathParam.append("petId").append("}");
fullPath.replace(pet_idPathParam, QUrl::toPercentEncoding(::OpenAPI::toStringValue(pet_id)));

OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker(this);
worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "DELETE");

Expand Down Expand Up @@ -196,7 +196,7 @@ OAIPetApi::findPetsByStatus(const QList<QString>& status) {
}
}

OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker(this);
worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "GET");

Expand Down Expand Up @@ -291,7 +291,7 @@ OAIPetApi::findPetsByTags(const QList<QString>& tags) {
}
}

OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker(this);
worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "GET");

Expand Down Expand Up @@ -349,7 +349,7 @@ OAIPetApi::getPetById(const qint64& pet_id) {
pet_idPathParam.append("petId").append("}");
fullPath.replace(pet_idPathParam, QUrl::toPercentEncoding(::OpenAPI::toStringValue(pet_id)));

OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker(this);
worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "GET");

Expand Down Expand Up @@ -395,7 +395,7 @@ OAIPetApi::updatePet(const OAIPet& body) {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/pet");

OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker(this);
worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "PUT");

Expand Down Expand Up @@ -447,7 +447,7 @@ OAIPetApi::updatePetWithForm(const qint64& pet_id, const QString& name, const QS
pet_idPathParam.append("petId").append("}");
fullPath.replace(pet_idPathParam, QUrl::toPercentEncoding(::OpenAPI::toStringValue(pet_id)));

OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker(this);
worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "POST");
if (name != nullptr) {
Expand Down Expand Up @@ -501,7 +501,7 @@ OAIPetApi::uploadFile(const qint64& pet_id, const QString& additional_metadata,
pet_idPathParam.append("petId").append("}");
fullPath.replace(pet_idPathParam, QUrl::toPercentEncoding(::OpenAPI::toStringValue(pet_id)));

OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker(this);
worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "POST");
if (additional_metadata != nullptr) {
Expand Down
8 changes: 4 additions & 4 deletions samples/client/petstore/cpp-qt5/client/OAIStoreApi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ OAIStoreApi::deleteOrder(const QString& order_id) {
order_idPathParam.append("orderId").append("}");
fullPath.replace(order_idPathParam, QUrl::toPercentEncoding(::OpenAPI::toStringValue(order_id)));

OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker(this);
worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "DELETE");

Expand Down Expand Up @@ -104,7 +104,7 @@ OAIStoreApi::getInventory() {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/store/inventory");

OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker(this);
worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "GET");

Expand Down Expand Up @@ -162,7 +162,7 @@ OAIStoreApi::getOrderById(const qint64& order_id) {
order_idPathParam.append("orderId").append("}");
fullPath.replace(order_idPathParam, QUrl::toPercentEncoding(::OpenAPI::toStringValue(order_id)));

OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker(this);
worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "GET");

Expand Down Expand Up @@ -208,7 +208,7 @@ OAIStoreApi::placeOrder(const OAIOrder& body) {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/store/order");

OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker(this);
worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "POST");

Expand Down
16 changes: 8 additions & 8 deletions samples/client/petstore/cpp-qt5/client/OAIUserApi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ OAIUserApi::createUser(const OAIUser& body) {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/user");

OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker(this);
worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "POST");

Expand Down Expand Up @@ -105,7 +105,7 @@ OAIUserApi::createUsersWithArrayInput(const QList<OAIUser>& body) {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/user/createWithArray");

OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker(this);
worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "POST");

Expand Down Expand Up @@ -155,7 +155,7 @@ OAIUserApi::createUsersWithListInput(const QList<OAIUser>& body) {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/user/createWithList");

OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker(this);
worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "POST");

Expand Down Expand Up @@ -208,7 +208,7 @@ OAIUserApi::deleteUser(const QString& username) {
usernamePathParam.append("username").append("}");
fullPath.replace(usernamePathParam, QUrl::toPercentEncoding(::OpenAPI::toStringValue(username)));

OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker(this);
worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "DELETE");

Expand Down Expand Up @@ -256,7 +256,7 @@ OAIUserApi::getUserByName(const QString& username) {
usernamePathParam.append("username").append("}");
fullPath.replace(usernamePathParam, QUrl::toPercentEncoding(::OpenAPI::toStringValue(username)));

OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker(this);
worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "GET");

Expand Down Expand Up @@ -318,7 +318,7 @@ OAIUserApi::loginUser(const QString& username, const QString& password) {
.append("=")
.append(QUrl::toPercentEncoding(::OpenAPI::toStringValue(password)));

OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker(this);
worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "GET");

Expand Down Expand Up @@ -365,7 +365,7 @@ OAIUserApi::logoutUser() {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/user/logout");

OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker(this);
worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "GET");

Expand Down Expand Up @@ -413,7 +413,7 @@ OAIUserApi::updateUser(const QString& username, const OAIUser& body) {
usernamePathParam.append("username").append("}");
fullPath.replace(usernamePathParam, QUrl::toPercentEncoding(::OpenAPI::toStringValue(username)));

OAIHttpRequestWorker *worker = new OAIHttpRequestWorker();
OAIHttpRequestWorker *worker = new OAIHttpRequestWorker(this);
worker->setTimeOut(timeout);
OAIHttpRequestInput input(fullPath, "PUT");

Expand Down