From 62caf7dac5a015b041ec70bf0816f296eb54d8e3 Mon Sep 17 00:00:00 2001 From: Tony Tam Date: Sat, 21 Jan 2017 16:33:14 -0800 Subject: [PATCH] rebuilt samples --- samples/client/petstore/qt5cpp/client/SWGOrder.cpp | 8 ++++---- samples/client/petstore/qt5cpp/client/SWGPet.cpp | 4 ++-- samples/client/petstore/qt5cpp/client/SWGUser.cpp | 12 ++++++------ 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/samples/client/petstore/qt5cpp/client/SWGOrder.cpp b/samples/client/petstore/qt5cpp/client/SWGOrder.cpp index 8e327ff370..8304a0a2e9 100644 --- a/samples/client/petstore/qt5cpp/client/SWGOrder.cpp +++ b/samples/client/petstore/qt5cpp/client/SWGOrder.cpp @@ -74,9 +74,9 @@ SWGOrder::fromJson(QString &json) { void SWGOrder::fromJsonObject(QJsonObject &pJson) { ::Swagger::setValue(&id, pJson["id"], "qint64", ""); - ::Swagger::setValue(&pet_id, pJson["pet_id"], "qint64", ""); + ::Swagger::setValue(&pet_id, pJson["petId"], "qint64", ""); ::Swagger::setValue(&quantity, pJson["quantity"], "qint32", ""); - ::Swagger::setValue(&ship_date, pJson["ship_date"], "QDateTime", "QDateTime"); + ::Swagger::setValue(&ship_date, pJson["shipDate"], "QDateTime", "QDateTime"); ::Swagger::setValue(&status, pJson["status"], "QString", "QString"); ::Swagger::setValue(&complete, pJson["complete"], "bool", ""); } @@ -97,11 +97,11 @@ SWGOrder::asJsonObject() { obj->insert("id", QJsonValue(id)); - obj->insert("pet_id", QJsonValue(pet_id)); + obj->insert("petId", QJsonValue(pet_id)); obj->insert("quantity", QJsonValue(quantity)); - toJsonValue(QString("ship_date"), ship_date, obj, QString("QDateTime")); + toJsonValue(QString("shipDate"), ship_date, obj, QString("QDateTime")); toJsonValue(QString("status"), status, obj, QString("QString")); diff --git a/samples/client/petstore/qt5cpp/client/SWGPet.cpp b/samples/client/petstore/qt5cpp/client/SWGPet.cpp index eadacec472..a719b004cf 100644 --- a/samples/client/petstore/qt5cpp/client/SWGPet.cpp +++ b/samples/client/petstore/qt5cpp/client/SWGPet.cpp @@ -94,7 +94,7 @@ SWGPet::fromJsonObject(QJsonObject &pJson) { ::Swagger::setValue(&category, pJson["category"], "SWGCategory", "SWGCategory"); ::Swagger::setValue(&name, pJson["name"], "QString", "QString"); - ::Swagger::setValue(&photo_urls, pJson["photo_urls"], "QList", "QString"); + ::Swagger::setValue(&photo_urls, pJson["photoUrls"], "QList", "QString"); ::Swagger::setValue(&tags, pJson["tags"], "QList", "SWGTag"); @@ -124,7 +124,7 @@ SWGPet::asJsonObject() { QJsonArray photo_urlsJsonArray; toJsonArray((QList*)photo_urls, &photo_urlsJsonArray, "photo_urls", "QString"); - obj->insert("photo_urls", photo_urlsJsonArray); + obj->insert("photoUrls", photo_urlsJsonArray); QJsonArray tagsJsonArray; toJsonArray((QList*)tags, &tagsJsonArray, "tags", "SWGTag"); diff --git a/samples/client/petstore/qt5cpp/client/SWGUser.cpp b/samples/client/petstore/qt5cpp/client/SWGUser.cpp index 18c17b8e18..06358c2902 100644 --- a/samples/client/petstore/qt5cpp/client/SWGUser.cpp +++ b/samples/client/petstore/qt5cpp/client/SWGUser.cpp @@ -91,12 +91,12 @@ void SWGUser::fromJsonObject(QJsonObject &pJson) { ::Swagger::setValue(&id, pJson["id"], "qint64", ""); ::Swagger::setValue(&username, pJson["username"], "QString", "QString"); - ::Swagger::setValue(&first_name, pJson["first_name"], "QString", "QString"); - ::Swagger::setValue(&last_name, pJson["last_name"], "QString", "QString"); + ::Swagger::setValue(&first_name, pJson["firstName"], "QString", "QString"); + ::Swagger::setValue(&last_name, pJson["lastName"], "QString", "QString"); ::Swagger::setValue(&email, pJson["email"], "QString", "QString"); ::Swagger::setValue(&password, pJson["password"], "QString", "QString"); ::Swagger::setValue(&phone, pJson["phone"], "QString", "QString"); - ::Swagger::setValue(&user_status, pJson["user_status"], "qint32", ""); + ::Swagger::setValue(&user_status, pJson["userStatus"], "qint32", ""); } QString @@ -117,9 +117,9 @@ SWGUser::asJsonObject() { toJsonValue(QString("username"), username, obj, QString("QString")); - toJsonValue(QString("first_name"), first_name, obj, QString("QString")); + toJsonValue(QString("firstName"), first_name, obj, QString("QString")); - toJsonValue(QString("last_name"), last_name, obj, QString("QString")); + toJsonValue(QString("lastName"), last_name, obj, QString("QString")); toJsonValue(QString("email"), email, obj, QString("QString")); @@ -127,7 +127,7 @@ SWGUser::asJsonObject() { toJsonValue(QString("phone"), phone, obj, QString("QString")); - obj->insert("user_status", QJsonValue(user_status)); + obj->insert("userStatus", QJsonValue(user_status)); return obj; }