Files
openapi-generator/samples/client/petstore/qt5cpp/client/SWGStoreApi.h
etherealjoy 0bf430a803 Qt5cpp Add support for nested containers (#7340)
* Disable creation of empty json fields and fields for primitives which were not set, but using default values
modelnamePrefix will be the one passed from command line or SWG if none

* Updates after review
Also common http files are splitted
Update Petstore examples

* Small Fixes for cleaning up arrays of arrays/maps

* Changes
- Api Body pass by Reference, avoid seg fault due to deletion of auto constructed object passed as parameter.
- Support Maps and Arrays upto a depth of 2
- Refactor Helpers to handle Maps and simplify code

* Remove size check due to possible incorrect type

* Update PetStore Examples for Qt5 C++ and small fixes for QDate/QDateTime

* Updates after review. Fixes typo and remove usage of auto keyword.

* Restored usage of auto keyword.
2018-01-14 17:47:54 +08:00

69 lines
2.4 KiB
C++

/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
#ifndef _SWG_SWGStoreApi_H_
#define _SWG_SWGStoreApi_H_
#include "SWGHttpRequest.h"
#include <QMap>
#include <QString>
#include "SWGOrder.h"
#include <QObject>
namespace Swagger {
class SWGStoreApi: public QObject {
Q_OBJECT
public:
SWGStoreApi();
SWGStoreApi(QString host, QString basePath);
~SWGStoreApi();
QString host;
QString basePath;
QMap<QString, QString> defaultHeaders;
void deleteOrder(QString* order_id);
void getInventory();
void getOrderById(qint64 order_id);
void placeOrder(SWGOrder& body);
private:
void deleteOrderCallback (SWGHttpRequestWorker * worker);
void getInventoryCallback (SWGHttpRequestWorker * worker);
void getOrderByIdCallback (SWGHttpRequestWorker * worker);
void placeOrderCallback (SWGHttpRequestWorker * worker);
signals:
void deleteOrderSignal();
void getInventorySignal(QMap<QString, qint32>* summary);
void getOrderByIdSignal(SWGOrder* summary);
void placeOrderSignal(SWGOrder* summary);
void deleteOrderSignalE(QNetworkReply::NetworkError error_type, QString& error_str);
void getInventorySignalE(QMap<QString, qint32>* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void getOrderByIdSignalE(SWGOrder* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void placeOrderSignalE(SWGOrder* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void deleteOrderSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void getInventorySignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void getOrderByIdSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void placeOrderSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
};
}
#endif