mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-11 14:52:45 +00:00
remove spaces, empty lines from qt5cpp client (#6956)
This commit is contained in:
@@ -44,12 +44,10 @@ SWGApiResponse::init() {
|
||||
|
||||
void
|
||||
SWGApiResponse::cleanup() {
|
||||
|
||||
|
||||
if(type != nullptr) {
|
||||
delete type;
|
||||
}
|
||||
|
||||
if(message != nullptr) {
|
||||
delete message;
|
||||
}
|
||||
@@ -84,11 +82,8 @@ SWGApiResponse::asJson ()
|
||||
QJsonObject*
|
||||
SWGApiResponse::asJsonObject() {
|
||||
QJsonObject* obj = new QJsonObject();
|
||||
|
||||
obj->insert("code", QJsonValue(code));
|
||||
|
||||
toJsonValue(QString("type"), type, obj, QString("QString"));
|
||||
|
||||
toJsonValue(QString("message"), message, obj, QString("QString"));
|
||||
|
||||
return obj;
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
|
||||
#include "SWGObject.h"
|
||||
|
||||
|
||||
namespace Swagger {
|
||||
|
||||
class SWGApiResponse: public SWGObject {
|
||||
|
||||
@@ -43,7 +43,6 @@ SWGCategory::init() {
|
||||
|
||||
void
|
||||
SWGCategory::cleanup() {
|
||||
|
||||
|
||||
if(name != nullptr) {
|
||||
delete name;
|
||||
@@ -78,9 +77,7 @@ SWGCategory::asJson ()
|
||||
QJsonObject*
|
||||
SWGCategory::asJsonObject() {
|
||||
QJsonObject* obj = new QJsonObject();
|
||||
|
||||
obj->insert("id", QJsonValue(id));
|
||||
|
||||
toJsonValue(QString("name"), name, obj, QString("QString"));
|
||||
|
||||
return obj;
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
|
||||
#include "SWGObject.h"
|
||||
|
||||
|
||||
namespace Swagger {
|
||||
|
||||
class SWGCategory: public SWGObject {
|
||||
|
||||
@@ -47,14 +47,12 @@ SWGOrder::init() {
|
||||
|
||||
void
|
||||
SWGOrder::cleanup() {
|
||||
|
||||
|
||||
|
||||
|
||||
if(ship_date != nullptr) {
|
||||
delete ship_date;
|
||||
}
|
||||
|
||||
if(status != nullptr) {
|
||||
delete status;
|
||||
}
|
||||
@@ -93,17 +91,11 @@ SWGOrder::asJson ()
|
||||
QJsonObject*
|
||||
SWGOrder::asJsonObject() {
|
||||
QJsonObject* obj = new QJsonObject();
|
||||
|
||||
obj->insert("id", QJsonValue(id));
|
||||
|
||||
obj->insert("petId", QJsonValue(pet_id));
|
||||
|
||||
obj->insert("quantity", QJsonValue(quantity));
|
||||
|
||||
toJsonValue(QString("shipDate"), ship_date, obj, QString("QDateTime"));
|
||||
|
||||
toJsonValue(QString("status"), status, obj, QString("QString"));
|
||||
|
||||
obj->insert("complete", QJsonValue(complete));
|
||||
|
||||
return obj;
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
|
||||
#include "SWGObject.h"
|
||||
|
||||
|
||||
namespace Swagger {
|
||||
|
||||
class SWGOrder: public SWGObject {
|
||||
|
||||
@@ -47,16 +47,13 @@ SWGPet::init() {
|
||||
|
||||
void
|
||||
SWGPet::cleanup() {
|
||||
|
||||
|
||||
if(category != nullptr) {
|
||||
delete category;
|
||||
}
|
||||
|
||||
if(name != nullptr) {
|
||||
delete name;
|
||||
}
|
||||
|
||||
if(photo_urls != nullptr) {
|
||||
QList<QString*>* arr = photo_urls;
|
||||
foreach(QString* o, *arr) {
|
||||
@@ -64,7 +61,6 @@ SWGPet::cleanup() {
|
||||
}
|
||||
delete photo_urls;
|
||||
}
|
||||
|
||||
if(tags != nullptr) {
|
||||
QList<SWGTag*>* arr = tags;
|
||||
foreach(SWGTag* o, *arr) {
|
||||
@@ -72,7 +68,6 @@ SWGPet::cleanup() {
|
||||
}
|
||||
delete tags;
|
||||
}
|
||||
|
||||
if(status != nullptr) {
|
||||
delete status;
|
||||
}
|
||||
@@ -92,12 +87,8 @@ SWGPet::fromJsonObject(QJsonObject &pJson) {
|
||||
::Swagger::setValue(&id, pJson["id"], "qint64", "");
|
||||
::Swagger::setValue(&category, pJson["category"], "SWGCategory", "SWGCategory");
|
||||
::Swagger::setValue(&name, pJson["name"], "QString", "QString");
|
||||
|
||||
::Swagger::setValue(&photo_urls, pJson["photoUrls"], "QList", "QString");
|
||||
|
||||
|
||||
::Swagger::setValue(&tags, pJson["tags"], "QList", "SWGTag");
|
||||
|
||||
::Swagger::setValue(&status, pJson["status"], "QString", "QString");
|
||||
}
|
||||
|
||||
@@ -114,21 +105,15 @@ SWGPet::asJson ()
|
||||
QJsonObject*
|
||||
SWGPet::asJsonObject() {
|
||||
QJsonObject* obj = new QJsonObject();
|
||||
|
||||
obj->insert("id", QJsonValue(id));
|
||||
|
||||
toJsonValue(QString("category"), category, obj, QString("SWGCategory"));
|
||||
|
||||
toJsonValue(QString("name"), name, obj, QString("QString"));
|
||||
|
||||
QJsonArray photo_urlsJsonArray;
|
||||
toJsonArray((QList<void*>*)photo_urls, &photo_urlsJsonArray, "photo_urls", "QString");
|
||||
obj->insert("photoUrls", photo_urlsJsonArray);
|
||||
|
||||
QJsonArray tagsJsonArray;
|
||||
toJsonArray((QList<void*>*)tags, &tagsJsonArray, "tags", "SWGTag");
|
||||
obj->insert("tags", tagsJsonArray);
|
||||
|
||||
toJsonValue(QString("status"), status, obj, QString("QString"));
|
||||
|
||||
return obj;
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
|
||||
#include "SWGObject.h"
|
||||
|
||||
|
||||
namespace Swagger {
|
||||
|
||||
class SWGPet: public SWGObject {
|
||||
|
||||
@@ -43,7 +43,6 @@ SWGTag::init() {
|
||||
|
||||
void
|
||||
SWGTag::cleanup() {
|
||||
|
||||
|
||||
if(name != nullptr) {
|
||||
delete name;
|
||||
@@ -78,9 +77,7 @@ SWGTag::asJson ()
|
||||
QJsonObject*
|
||||
SWGTag::asJsonObject() {
|
||||
QJsonObject* obj = new QJsonObject();
|
||||
|
||||
obj->insert("id", QJsonValue(id));
|
||||
|
||||
toJsonValue(QString("name"), name, obj, QString("QString"));
|
||||
|
||||
return obj;
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
|
||||
#include "SWGObject.h"
|
||||
|
||||
|
||||
namespace Swagger {
|
||||
|
||||
class SWGTag: public SWGObject {
|
||||
|
||||
@@ -49,28 +49,22 @@ SWGUser::init() {
|
||||
|
||||
void
|
||||
SWGUser::cleanup() {
|
||||
|
||||
|
||||
if(username != nullptr) {
|
||||
delete username;
|
||||
}
|
||||
|
||||
if(first_name != nullptr) {
|
||||
delete first_name;
|
||||
}
|
||||
|
||||
if(last_name != nullptr) {
|
||||
delete last_name;
|
||||
}
|
||||
|
||||
if(email != nullptr) {
|
||||
delete email;
|
||||
}
|
||||
|
||||
if(password != nullptr) {
|
||||
delete password;
|
||||
}
|
||||
|
||||
if(phone != nullptr) {
|
||||
delete phone;
|
||||
}
|
||||
@@ -111,21 +105,13 @@ SWGUser::asJson ()
|
||||
QJsonObject*
|
||||
SWGUser::asJsonObject() {
|
||||
QJsonObject* obj = new QJsonObject();
|
||||
|
||||
obj->insert("id", QJsonValue(id));
|
||||
|
||||
toJsonValue(QString("username"), username, obj, QString("QString"));
|
||||
|
||||
toJsonValue(QString("firstName"), first_name, obj, QString("QString"));
|
||||
|
||||
toJsonValue(QString("lastName"), last_name, obj, QString("QString"));
|
||||
|
||||
toJsonValue(QString("email"), email, obj, QString("QString"));
|
||||
|
||||
toJsonValue(QString("password"), password, obj, QString("QString"));
|
||||
|
||||
toJsonValue(QString("phone"), phone, obj, QString("QString"));
|
||||
|
||||
obj->insert("userStatus", QJsonValue(user_status));
|
||||
|
||||
return obj;
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
|
||||
#include "SWGObject.h"
|
||||
|
||||
|
||||
namespace Swagger {
|
||||
|
||||
class SWGUser: public SWGObject {
|
||||
|
||||
Reference in New Issue
Block a user