Files
openapi-generator/samples/client/petstore/qt5cpp/client/SWGHelpers.h
etherealjoy ea4b948428 [qt5cpp] Add nullptr guard to prevent crash when empty model is being serialized (#7434)
* Small fixes to prevent crash when empty json body is provided.

* Updated PetStore example for Qt5
2018-01-19 15:36:45 +08:00

35 lines
1.2 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_HELPERS_H
#define SWG_HELPERS_H
#include <QJsonValue>
#include <QList>
#include <QMap>
namespace Swagger {
void setValue(void* value, QJsonValue obj, QString type, QString complexType);
void toJsonArray(QList<void*>* value, QJsonObject* output, QString innerName, QString innerType);
void toJsonValue(QString name, void* value, QJsonObject* output, QString type);
void toJsonMap(QMap<QString, void*>* value, QJsonObject* output, QString innerName, QString innerType);
bool isCompatibleJsonValue(QString type);
QString stringValue(QString* value);
QString stringValue(qint32 value);
QString stringValue(qint64 value);
QString stringValue(bool value);
}
#endif // SWG_HELPERS_H