forked from loafle/openapi-generator-original
* Small fixes to prevent crash when empty json body is provided. * Fix some more memory Leaks in the model-body - Members not deleted in cleanup() method, for maps/arrays of primitive types. - Avoid undefined behavior when updating class members with data from missing json fields
36 lines
1.3 KiB
C++
36 lines
1.3 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 <QJsonObject>
|
|
#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
|