mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-11 04:52:44 +00:00
* add asJsonObject method to OAIEnum class to fix enum handling in query parameters * update samples --------- Co-authored-by: William Cheng <wing328hk@gmail.com>
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#ifndef PFX_ENUM_H
|
||||
#define PFX_ENUM_H
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QMetaType>
|
||||
#include <QString>
|
||||
@@ -36,6 +37,12 @@ public:
|
||||
return jstr;
|
||||
}
|
||||
|
||||
virtual QJsonObject asJsonObject() const {
|
||||
QJsonObject obj;
|
||||
obj["value"] = jstr;
|
||||
return obj;
|
||||
}
|
||||
|
||||
virtual void fromJson(QString jsonString) {
|
||||
jstr = jsonString;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user