mirror of
				https://github.com/OpenAPITools/openapi-generator.git
				synced 2025-11-03 18:23:44 +00:00 
			
		
		
		
	remove spaces, empty lines from qt5cpp client (#6956)
This commit is contained in:
		
							parent
							
								
									47f1865e69
								
							
						
					
					
						commit
						744c7d904a
					
				@ -35,7 +35,8 @@ void
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
void
 | 
					void
 | 
				
			||||||
{{classname}}::cleanup() {
 | 
					{{classname}}::cleanup() {
 | 
				
			||||||
    {{#vars}}{{#complexType}}
 | 
					    {{#vars}}
 | 
				
			||||||
 | 
					    {{#complexType}}
 | 
				
			||||||
    if({{name}} != nullptr) {
 | 
					    if({{name}} != nullptr) {
 | 
				
			||||||
        {{#isContainer}}{{#isListContainer}}QList<{{complexType}}*>* arr = {{name}};{{/isListContainer}}{{#isMapContainer}}QMap<QString, {{complexType}}*>* arr = {{name}};{{/isMapContainer}}
 | 
					        {{#isContainer}}{{#isListContainer}}QList<{{complexType}}*>* arr = {{name}};{{/isListContainer}}{{#isMapContainer}}QMap<QString, {{complexType}}*>* arr = {{name}};{{/isMapContainer}}
 | 
				
			||||||
        foreach({{complexType}}* o, *arr) {
 | 
					        foreach({{complexType}}* o, *arr) {
 | 
				
			||||||
@ -58,10 +59,16 @@ void
 | 
				
			|||||||
void
 | 
					void
 | 
				
			||||||
{{classname}}::fromJsonObject(QJsonObject &pJson) {
 | 
					{{classname}}::fromJsonObject(QJsonObject &pJson) {
 | 
				
			||||||
    {{#vars}}
 | 
					    {{#vars}}
 | 
				
			||||||
    {{^isContainer}}::{{cppNamespace}}::setValue(&{{name}}, pJson["{{baseName}}"], "{{baseType}}", "{{complexType}}");{{/isContainer}} 
 | 
					    {{^isContainer}}
 | 
				
			||||||
 | 
					    ::{{cppNamespace}}::setValue(&{{name}}, pJson["{{baseName}}"], "{{baseType}}", "{{complexType}}");
 | 
				
			||||||
 | 
					    {{/isContainer}}
 | 
				
			||||||
    {{#isListContainer}}
 | 
					    {{#isListContainer}}
 | 
				
			||||||
    {{#complexType}}::{{cppNamespace}}::setValue(&{{name}}, pJson["{{baseName}}"], "{{baseType}}", "{{complexType}}");{{/complexType}}
 | 
					    {{#complexType}}
 | 
				
			||||||
    {{^complexType}}::{{cppNamespace}}::setValue(&{{name}}, pJson["{{baseName}}"], "{{baseType}}", "{{items.baseType}}");{{/complexType}}
 | 
					    ::{{cppNamespace}}::setValue(&{{name}}, pJson["{{baseName}}"], "{{baseType}}", "{{complexType}}");
 | 
				
			||||||
 | 
					    {{/complexType}}
 | 
				
			||||||
 | 
					    {{^complexType}}
 | 
				
			||||||
 | 
					    ::{{cppNamespace}}::setValue(&{{name}}, pJson["{{baseName}}"], "{{baseType}}", "{{items.baseType}}");
 | 
				
			||||||
 | 
					    {{/complexType}}
 | 
				
			||||||
    {{/isListContainer}}        
 | 
					    {{/isListContainer}}        
 | 
				
			||||||
    {{#isMapContainer}}    
 | 
					    {{#isMapContainer}}    
 | 
				
			||||||
    if( pJson["{{baseName}}"].isObject()){
 | 
					    if( pJson["{{baseName}}"].isObject()){
 | 
				
			||||||
@ -95,32 +102,52 @@ QString
 | 
				
			|||||||
QJsonObject*
 | 
					QJsonObject*
 | 
				
			||||||
{{classname}}::asJsonObject() {
 | 
					{{classname}}::asJsonObject() {
 | 
				
			||||||
    QJsonObject* obj = new QJsonObject();
 | 
					    QJsonObject* obj = new QJsonObject();
 | 
				
			||||||
    {{#vars}}{{#complexType}}{{^isContainer}}{{#complexType}}
 | 
					    {{#vars}}
 | 
				
			||||||
    toJsonValue(QString("{{baseName}}"), {{name}}, obj, QString("{{complexType}}"));{{/complexType}}{{^complexType}}
 | 
					    {{#complexType}}
 | 
				
			||||||
 | 
					    {{^isContainer}}
 | 
				
			||||||
 | 
					    {{#complexType}}
 | 
				
			||||||
 | 
					    toJsonValue(QString("{{baseName}}"), {{name}}, obj, QString("{{complexType}}"));
 | 
				
			||||||
 | 
					    {{/complexType}}
 | 
				
			||||||
 | 
					    {{^complexType}}
 | 
				
			||||||
    if({{name}} != nullptr && *{{name}} != nullptr) { 
 | 
					    if({{name}} != nullptr && *{{name}} != nullptr) { 
 | 
				
			||||||
        obj->insert("{{name}}", QJsonValue(*{{name}}));
 | 
					        obj->insert("{{name}}", QJsonValue(*{{name}}));
 | 
				
			||||||
    }{{/complexType}}{{/isContainer}}{{#isListContainer}}
 | 
					    }
 | 
				
			||||||
 | 
					    {{/complexType}}
 | 
				
			||||||
 | 
					    {{/isContainer}}
 | 
				
			||||||
 | 
					    {{#isListContainer}}
 | 
				
			||||||
    QJsonArray {{name}}JsonArray;
 | 
					    QJsonArray {{name}}JsonArray;
 | 
				
			||||||
    toJsonArray((QList<void*>*){{name}}, &{{name}}JsonArray, "{{name}}", "{{complexType}}");
 | 
					    toJsonArray((QList<void*>*){{name}}, &{{name}}JsonArray, "{{name}}", "{{complexType}}");
 | 
				
			||||||
    obj->insert("{{baseName}}", {{name}}JsonArray);{{/isListContainer}}{{#isMapContainer}}
 | 
					    obj->insert("{{baseName}}", {{name}}JsonArray);
 | 
				
			||||||
 | 
					    {{/isListContainer}}
 | 
				
			||||||
 | 
					    {{#isMapContainer}}
 | 
				
			||||||
    QJsonArray {{name}}JsonArray;
 | 
					    QJsonArray {{name}}JsonArray;
 | 
				
			||||||
    for(auto keyval : {{name}}->keys()){
 | 
					    for(auto keyval : {{name}}->keys()){
 | 
				
			||||||
	    QJsonObject {{name}}_jobj;
 | 
						    QJsonObject {{name}}_jobj;
 | 
				
			||||||
	    toJsonValue(keyval, ((*{{name}})[keyval]), &{{name}}_jobj, "{{complexType}}");
 | 
						    toJsonValue(keyval, ((*{{name}})[keyval]), &{{name}}_jobj, "{{complexType}}");
 | 
				
			||||||
	    {{name}}JsonArray.append({{name}}_jobj);
 | 
						    {{name}}JsonArray.append({{name}}_jobj);
 | 
				
			||||||
	}   
 | 
						}   
 | 
				
			||||||
    obj->insert("{{baseName}}", {{name}}JsonArray);{{/isMapContainer}}{{/complexType}}{{^complexType}}{{^isContainer}}
 | 
					    obj->insert("{{baseName}}", {{name}}JsonArray);
 | 
				
			||||||
    obj->insert("{{baseName}}", QJsonValue({{name}}));{{/isContainer}}{{#isListContainer}}
 | 
					    {{/isMapContainer}}
 | 
				
			||||||
 | 
					    {{/complexType}}
 | 
				
			||||||
 | 
					    {{^complexType}}
 | 
				
			||||||
 | 
					    {{^isContainer}}
 | 
				
			||||||
 | 
					    obj->insert("{{baseName}}", QJsonValue({{name}}));
 | 
				
			||||||
 | 
					    {{/isContainer}}
 | 
				
			||||||
 | 
					    {{#isListContainer}}
 | 
				
			||||||
    QJsonArray {{name}}JsonArray;
 | 
					    QJsonArray {{name}}JsonArray;
 | 
				
			||||||
    toJsonArray((QList<void*>*){{name}}, &{{name}}JsonArray, "{{name}}", "{{items.baseType}}");
 | 
					    toJsonArray((QList<void*>*){{name}}, &{{name}}JsonArray, "{{name}}", "{{items.baseType}}");
 | 
				
			||||||
    obj->insert("{{baseName}}", {{name}}JsonArray);{{/isListContainer}}{{#isMapContainer}}
 | 
					    obj->insert("{{baseName}}", {{name}}JsonArray);
 | 
				
			||||||
 | 
					    {{/isListContainer}}
 | 
				
			||||||
 | 
					    {{#isMapContainer}}
 | 
				
			||||||
    QJsonArray {{name}}JsonArray;
 | 
					    QJsonArray {{name}}JsonArray;
 | 
				
			||||||
    for(auto keyval : {{name}}->keys()){
 | 
					    for(auto keyval : {{name}}->keys()){
 | 
				
			||||||
	    QJsonObject {{name}}_jobj;
 | 
						    QJsonObject {{name}}_jobj;
 | 
				
			||||||
	    toJsonValue(keyval, ((*{{name}})[keyval]), &{{name}}_jobj, "{{items.baseType}}");
 | 
						    toJsonValue(keyval, ((*{{name}})[keyval]), &{{name}}_jobj, "{{items.baseType}}");
 | 
				
			||||||
	    {{name}}JsonArray.append(portsobj);
 | 
						    {{name}}JsonArray.append(portsobj);
 | 
				
			||||||
	}     
 | 
						}     
 | 
				
			||||||
    obj->insert("{{baseName}}", {{name}}JsonArray);{{/isMapContainer}}{{/complexType}}
 | 
					    obj->insert("{{baseName}}", {{name}}JsonArray);
 | 
				
			||||||
 | 
					    {{/isMapContainer}}
 | 
				
			||||||
 | 
					    {{/complexType}}
 | 
				
			||||||
    {{/vars}}
 | 
					    {{/vars}}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return obj;
 | 
					    return obj;
 | 
				
			||||||
 | 
				
			|||||||
@ -16,7 +16,8 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#include "SWGObject.h"
 | 
					#include "SWGObject.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{{#models}}{{#model}}
 | 
					{{#models}}
 | 
				
			||||||
 | 
					{{#model}}
 | 
				
			||||||
{{#cppNamespaceDeclarations}}
 | 
					{{#cppNamespaceDeclarations}}
 | 
				
			||||||
namespace {{this}} {
 | 
					namespace {{this}} {
 | 
				
			||||||
{{/cppNamespaceDeclarations}}
 | 
					{{/cppNamespaceDeclarations}}
 | 
				
			||||||
 | 
				
			|||||||
@ -21,7 +21,8 @@ using namespace Tizen::Web::Json;
 | 
				
			|||||||
{{#imports}}{{{import}}}
 | 
					{{#imports}}{{{import}}}
 | 
				
			||||||
{{/imports}}
 | 
					{{/imports}}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{{#models}}{{#model}}
 | 
					{{#models}}
 | 
				
			||||||
 | 
					{{#model}}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{{#cppNamespaceDeclarations}}
 | 
					{{#cppNamespaceDeclarations}}
 | 
				
			||||||
namespace {{this}} {
 | 
					namespace {{this}} {
 | 
				
			||||||
@ -47,11 +48,12 @@ public:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    {{#vars}}
 | 
					    {{#vars}}
 | 
				
			||||||
    {{datatype}} {{getter}}();
 | 
					    {{datatype}} {{getter}}();
 | 
				
			||||||
    void {{setter}}({{datatype}} {{name}});
 | 
					    void {{setter}}({{{datatype}}} {{name}});
 | 
				
			||||||
    {{/vars}}
 | 
					    {{/vars}}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
private:
 | 
					private:
 | 
				
			||||||
    {{#vars}}{{datatype}} {{name}};
 | 
					    {{#vars}}
 | 
				
			||||||
 | 
					    {{{datatype}}} {{name}};
 | 
				
			||||||
    {{/vars}}
 | 
					    {{/vars}}
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -44,12 +44,10 @@ SWGApiResponse::init() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
void
 | 
					void
 | 
				
			||||||
SWGApiResponse::cleanup() {
 | 
					SWGApiResponse::cleanup() {
 | 
				
			||||||
    
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if(type != nullptr) {
 | 
					    if(type != nullptr) {
 | 
				
			||||||
        delete type;
 | 
					        delete type;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					 | 
				
			||||||
    if(message != nullptr) {
 | 
					    if(message != nullptr) {
 | 
				
			||||||
        delete message;
 | 
					        delete message;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@ -84,11 +82,8 @@ SWGApiResponse::asJson ()
 | 
				
			|||||||
QJsonObject*
 | 
					QJsonObject*
 | 
				
			||||||
SWGApiResponse::asJsonObject() {
 | 
					SWGApiResponse::asJsonObject() {
 | 
				
			||||||
    QJsonObject* obj = new QJsonObject();
 | 
					    QJsonObject* obj = new QJsonObject();
 | 
				
			||||||
    
 | 
					 | 
				
			||||||
    obj->insert("code", QJsonValue(code));
 | 
					    obj->insert("code", QJsonValue(code));
 | 
				
			||||||
 | 
					 | 
				
			||||||
    toJsonValue(QString("type"), type, obj, QString("QString"));
 | 
					    toJsonValue(QString("type"), type, obj, QString("QString"));
 | 
				
			||||||
 | 
					 | 
				
			||||||
    toJsonValue(QString("message"), message, obj, QString("QString"));
 | 
					    toJsonValue(QString("message"), message, obj, QString("QString"));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return obj;
 | 
					    return obj;
 | 
				
			||||||
 | 
				
			|||||||
@ -26,7 +26,6 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#include "SWGObject.h"
 | 
					#include "SWGObject.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
namespace Swagger {
 | 
					namespace Swagger {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class SWGApiResponse: public SWGObject {
 | 
					class SWGApiResponse: public SWGObject {
 | 
				
			||||||
 | 
				
			|||||||
@ -43,7 +43,6 @@ SWGCategory::init() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
void
 | 
					void
 | 
				
			||||||
SWGCategory::cleanup() {
 | 
					SWGCategory::cleanup() {
 | 
				
			||||||
    
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if(name != nullptr) {
 | 
					    if(name != nullptr) {
 | 
				
			||||||
        delete name;
 | 
					        delete name;
 | 
				
			||||||
@ -78,9 +77,7 @@ SWGCategory::asJson ()
 | 
				
			|||||||
QJsonObject*
 | 
					QJsonObject*
 | 
				
			||||||
SWGCategory::asJsonObject() {
 | 
					SWGCategory::asJsonObject() {
 | 
				
			||||||
    QJsonObject* obj = new QJsonObject();
 | 
					    QJsonObject* obj = new QJsonObject();
 | 
				
			||||||
    
 | 
					 | 
				
			||||||
    obj->insert("id", QJsonValue(id));
 | 
					    obj->insert("id", QJsonValue(id));
 | 
				
			||||||
 | 
					 | 
				
			||||||
    toJsonValue(QString("name"), name, obj, QString("QString"));
 | 
					    toJsonValue(QString("name"), name, obj, QString("QString"));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return obj;
 | 
					    return obj;
 | 
				
			||||||
 | 
				
			|||||||
@ -26,7 +26,6 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#include "SWGObject.h"
 | 
					#include "SWGObject.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
namespace Swagger {
 | 
					namespace Swagger {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class SWGCategory: public SWGObject {
 | 
					class SWGCategory: public SWGObject {
 | 
				
			||||||
 | 
				
			|||||||
@ -47,14 +47,12 @@ SWGOrder::init() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
void
 | 
					void
 | 
				
			||||||
SWGOrder::cleanup() {
 | 
					SWGOrder::cleanup() {
 | 
				
			||||||
    
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if(ship_date != nullptr) {
 | 
					    if(ship_date != nullptr) {
 | 
				
			||||||
        delete ship_date;
 | 
					        delete ship_date;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					 | 
				
			||||||
    if(status != nullptr) {
 | 
					    if(status != nullptr) {
 | 
				
			||||||
        delete status;
 | 
					        delete status;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@ -93,17 +91,11 @@ SWGOrder::asJson ()
 | 
				
			|||||||
QJsonObject*
 | 
					QJsonObject*
 | 
				
			||||||
SWGOrder::asJsonObject() {
 | 
					SWGOrder::asJsonObject() {
 | 
				
			||||||
    QJsonObject* obj = new QJsonObject();
 | 
					    QJsonObject* obj = new QJsonObject();
 | 
				
			||||||
    
 | 
					 | 
				
			||||||
    obj->insert("id", QJsonValue(id));
 | 
					    obj->insert("id", QJsonValue(id));
 | 
				
			||||||
 | 
					 | 
				
			||||||
    obj->insert("petId", QJsonValue(pet_id));
 | 
					    obj->insert("petId", QJsonValue(pet_id));
 | 
				
			||||||
 | 
					 | 
				
			||||||
    obj->insert("quantity", QJsonValue(quantity));
 | 
					    obj->insert("quantity", QJsonValue(quantity));
 | 
				
			||||||
 | 
					 | 
				
			||||||
    toJsonValue(QString("shipDate"), ship_date, obj, QString("QDateTime"));
 | 
					    toJsonValue(QString("shipDate"), ship_date, obj, QString("QDateTime"));
 | 
				
			||||||
 | 
					 | 
				
			||||||
    toJsonValue(QString("status"), status, obj, QString("QString"));
 | 
					    toJsonValue(QString("status"), status, obj, QString("QString"));
 | 
				
			||||||
 | 
					 | 
				
			||||||
    obj->insert("complete", QJsonValue(complete));
 | 
					    obj->insert("complete", QJsonValue(complete));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return obj;
 | 
					    return obj;
 | 
				
			||||||
 | 
				
			|||||||
@ -27,7 +27,6 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#include "SWGObject.h"
 | 
					#include "SWGObject.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
namespace Swagger {
 | 
					namespace Swagger {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class SWGOrder: public SWGObject {
 | 
					class SWGOrder: public SWGObject {
 | 
				
			||||||
 | 
				
			|||||||
@ -47,16 +47,13 @@ SWGPet::init() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
void
 | 
					void
 | 
				
			||||||
SWGPet::cleanup() {
 | 
					SWGPet::cleanup() {
 | 
				
			||||||
    
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if(category != nullptr) {
 | 
					    if(category != nullptr) {
 | 
				
			||||||
        delete category;
 | 
					        delete category;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					 | 
				
			||||||
    if(name != nullptr) {
 | 
					    if(name != nullptr) {
 | 
				
			||||||
        delete name;
 | 
					        delete name;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					 | 
				
			||||||
    if(photo_urls != nullptr) {
 | 
					    if(photo_urls != nullptr) {
 | 
				
			||||||
        QList<QString*>* arr = photo_urls;
 | 
					        QList<QString*>* arr = photo_urls;
 | 
				
			||||||
        foreach(QString* o, *arr) {
 | 
					        foreach(QString* o, *arr) {
 | 
				
			||||||
@ -64,7 +61,6 @@ SWGPet::cleanup() {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
        delete photo_urls;
 | 
					        delete photo_urls;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					 | 
				
			||||||
    if(tags != nullptr) {
 | 
					    if(tags != nullptr) {
 | 
				
			||||||
        QList<SWGTag*>* arr = tags;
 | 
					        QList<SWGTag*>* arr = tags;
 | 
				
			||||||
        foreach(SWGTag* o, *arr) {
 | 
					        foreach(SWGTag* o, *arr) {
 | 
				
			||||||
@ -72,7 +68,6 @@ SWGPet::cleanup() {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
        delete tags;
 | 
					        delete tags;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					 | 
				
			||||||
    if(status != nullptr) {
 | 
					    if(status != nullptr) {
 | 
				
			||||||
        delete status;
 | 
					        delete status;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@ -92,12 +87,8 @@ SWGPet::fromJsonObject(QJsonObject &pJson) {
 | 
				
			|||||||
    ::Swagger::setValue(&id, pJson["id"], "qint64", "");
 | 
					    ::Swagger::setValue(&id, pJson["id"], "qint64", "");
 | 
				
			||||||
    ::Swagger::setValue(&category, pJson["category"], "SWGCategory", "SWGCategory");
 | 
					    ::Swagger::setValue(&category, pJson["category"], "SWGCategory", "SWGCategory");
 | 
				
			||||||
    ::Swagger::setValue(&name, pJson["name"], "QString", "QString");
 | 
					    ::Swagger::setValue(&name, pJson["name"], "QString", "QString");
 | 
				
			||||||
    
 | 
					 | 
				
			||||||
    ::Swagger::setValue(&photo_urls, pJson["photoUrls"], "QList", "QString");
 | 
					    ::Swagger::setValue(&photo_urls, pJson["photoUrls"], "QList", "QString");
 | 
				
			||||||
    
 | 
					 | 
				
			||||||
    
 | 
					 | 
				
			||||||
    ::Swagger::setValue(&tags, pJson["tags"], "QList", "SWGTag");
 | 
					    ::Swagger::setValue(&tags, pJson["tags"], "QList", "SWGTag");
 | 
				
			||||||
    
 | 
					 | 
				
			||||||
    ::Swagger::setValue(&status, pJson["status"], "QString", "QString");
 | 
					    ::Swagger::setValue(&status, pJson["status"], "QString", "QString");
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -114,21 +105,15 @@ SWGPet::asJson ()
 | 
				
			|||||||
QJsonObject*
 | 
					QJsonObject*
 | 
				
			||||||
SWGPet::asJsonObject() {
 | 
					SWGPet::asJsonObject() {
 | 
				
			||||||
    QJsonObject* obj = new QJsonObject();
 | 
					    QJsonObject* obj = new QJsonObject();
 | 
				
			||||||
    
 | 
					 | 
				
			||||||
    obj->insert("id", QJsonValue(id));
 | 
					    obj->insert("id", QJsonValue(id));
 | 
				
			||||||
 | 
					 | 
				
			||||||
    toJsonValue(QString("category"), category, obj, QString("SWGCategory"));
 | 
					    toJsonValue(QString("category"), category, obj, QString("SWGCategory"));
 | 
				
			||||||
 | 
					 | 
				
			||||||
    toJsonValue(QString("name"), name, obj, QString("QString"));
 | 
					    toJsonValue(QString("name"), name, obj, QString("QString"));
 | 
				
			||||||
 | 
					 | 
				
			||||||
    QJsonArray photo_urlsJsonArray;
 | 
					    QJsonArray photo_urlsJsonArray;
 | 
				
			||||||
    toJsonArray((QList<void*>*)photo_urls, &photo_urlsJsonArray, "photo_urls", "QString");
 | 
					    toJsonArray((QList<void*>*)photo_urls, &photo_urlsJsonArray, "photo_urls", "QString");
 | 
				
			||||||
    obj->insert("photoUrls", photo_urlsJsonArray);
 | 
					    obj->insert("photoUrls", photo_urlsJsonArray);
 | 
				
			||||||
 | 
					 | 
				
			||||||
    QJsonArray tagsJsonArray;
 | 
					    QJsonArray tagsJsonArray;
 | 
				
			||||||
    toJsonArray((QList<void*>*)tags, &tagsJsonArray, "tags", "SWGTag");
 | 
					    toJsonArray((QList<void*>*)tags, &tagsJsonArray, "tags", "SWGTag");
 | 
				
			||||||
    obj->insert("tags", tagsJsonArray);
 | 
					    obj->insert("tags", tagsJsonArray);
 | 
				
			||||||
 | 
					 | 
				
			||||||
    toJsonValue(QString("status"), status, obj, QString("QString"));
 | 
					    toJsonValue(QString("status"), status, obj, QString("QString"));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return obj;
 | 
					    return obj;
 | 
				
			||||||
 | 
				
			|||||||
@ -29,7 +29,6 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#include "SWGObject.h"
 | 
					#include "SWGObject.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
namespace Swagger {
 | 
					namespace Swagger {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class SWGPet: public SWGObject {
 | 
					class SWGPet: public SWGObject {
 | 
				
			||||||
 | 
				
			|||||||
@ -43,7 +43,6 @@ SWGTag::init() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
void
 | 
					void
 | 
				
			||||||
SWGTag::cleanup() {
 | 
					SWGTag::cleanup() {
 | 
				
			||||||
    
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if(name != nullptr) {
 | 
					    if(name != nullptr) {
 | 
				
			||||||
        delete name;
 | 
					        delete name;
 | 
				
			||||||
@ -78,9 +77,7 @@ SWGTag::asJson ()
 | 
				
			|||||||
QJsonObject*
 | 
					QJsonObject*
 | 
				
			||||||
SWGTag::asJsonObject() {
 | 
					SWGTag::asJsonObject() {
 | 
				
			||||||
    QJsonObject* obj = new QJsonObject();
 | 
					    QJsonObject* obj = new QJsonObject();
 | 
				
			||||||
    
 | 
					 | 
				
			||||||
    obj->insert("id", QJsonValue(id));
 | 
					    obj->insert("id", QJsonValue(id));
 | 
				
			||||||
 | 
					 | 
				
			||||||
    toJsonValue(QString("name"), name, obj, QString("QString"));
 | 
					    toJsonValue(QString("name"), name, obj, QString("QString"));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return obj;
 | 
					    return obj;
 | 
				
			||||||
 | 
				
			|||||||
@ -26,7 +26,6 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#include "SWGObject.h"
 | 
					#include "SWGObject.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
namespace Swagger {
 | 
					namespace Swagger {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class SWGTag: public SWGObject {
 | 
					class SWGTag: public SWGObject {
 | 
				
			||||||
 | 
				
			|||||||
@ -49,28 +49,22 @@ SWGUser::init() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
void
 | 
					void
 | 
				
			||||||
SWGUser::cleanup() {
 | 
					SWGUser::cleanup() {
 | 
				
			||||||
    
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if(username != nullptr) {
 | 
					    if(username != nullptr) {
 | 
				
			||||||
        delete username;
 | 
					        delete username;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					 | 
				
			||||||
    if(first_name != nullptr) {
 | 
					    if(first_name != nullptr) {
 | 
				
			||||||
        delete first_name;
 | 
					        delete first_name;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					 | 
				
			||||||
    if(last_name != nullptr) {
 | 
					    if(last_name != nullptr) {
 | 
				
			||||||
        delete last_name;
 | 
					        delete last_name;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					 | 
				
			||||||
    if(email != nullptr) {
 | 
					    if(email != nullptr) {
 | 
				
			||||||
        delete email;
 | 
					        delete email;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					 | 
				
			||||||
    if(password != nullptr) {
 | 
					    if(password != nullptr) {
 | 
				
			||||||
        delete password;
 | 
					        delete password;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					 | 
				
			||||||
    if(phone != nullptr) {
 | 
					    if(phone != nullptr) {
 | 
				
			||||||
        delete phone;
 | 
					        delete phone;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@ -111,21 +105,13 @@ SWGUser::asJson ()
 | 
				
			|||||||
QJsonObject*
 | 
					QJsonObject*
 | 
				
			||||||
SWGUser::asJsonObject() {
 | 
					SWGUser::asJsonObject() {
 | 
				
			||||||
    QJsonObject* obj = new QJsonObject();
 | 
					    QJsonObject* obj = new QJsonObject();
 | 
				
			||||||
    
 | 
					 | 
				
			||||||
    obj->insert("id", QJsonValue(id));
 | 
					    obj->insert("id", QJsonValue(id));
 | 
				
			||||||
 | 
					 | 
				
			||||||
    toJsonValue(QString("username"), username, obj, QString("QString"));
 | 
					    toJsonValue(QString("username"), username, obj, QString("QString"));
 | 
				
			||||||
 | 
					 | 
				
			||||||
    toJsonValue(QString("firstName"), first_name, obj, QString("QString"));
 | 
					    toJsonValue(QString("firstName"), first_name, obj, QString("QString"));
 | 
				
			||||||
 | 
					 | 
				
			||||||
    toJsonValue(QString("lastName"), last_name, obj, QString("QString"));
 | 
					    toJsonValue(QString("lastName"), last_name, obj, QString("QString"));
 | 
				
			||||||
 | 
					 | 
				
			||||||
    toJsonValue(QString("email"), email, obj, QString("QString"));
 | 
					    toJsonValue(QString("email"), email, obj, QString("QString"));
 | 
				
			||||||
 | 
					 | 
				
			||||||
    toJsonValue(QString("password"), password, obj, QString("QString"));
 | 
					    toJsonValue(QString("password"), password, obj, QString("QString"));
 | 
				
			||||||
 | 
					 | 
				
			||||||
    toJsonValue(QString("phone"), phone, obj, QString("QString"));
 | 
					    toJsonValue(QString("phone"), phone, obj, QString("QString"));
 | 
				
			||||||
 | 
					 | 
				
			||||||
    obj->insert("userStatus", QJsonValue(user_status));
 | 
					    obj->insert("userStatus", QJsonValue(user_status));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return obj;
 | 
					    return obj;
 | 
				
			||||||
 | 
				
			|||||||
@ -26,7 +26,6 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#include "SWGObject.h"
 | 
					#include "SWGObject.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
namespace Swagger {
 | 
					namespace Swagger {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class SWGUser: public SWGObject {
 | 
					class SWGUser: public SWGObject {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user