mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-09 12:56:16 +00:00
* Fixed #2643 Refactored to/from json functions to use universal object serialization method. * Code review found incorrect indenting and I forgot to remove unused mustache files. * Removed helpers class because it is not needed anymore. * Removed helpers package from docs. * Reverted helper class removal.
This commit is contained in:
@@ -19,9 +19,8 @@
|
||||
#define User_H_
|
||||
|
||||
|
||||
#include "ModelBase.h"
|
||||
|
||||
#include <string>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
namespace org {
|
||||
namespace openapitools {
|
||||
@@ -32,19 +31,12 @@ namespace model {
|
||||
/// A User who is purchasing from the pet store
|
||||
/// </summary>
|
||||
class User
|
||||
: public ModelBase
|
||||
{
|
||||
public:
|
||||
User();
|
||||
virtual ~User();
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// ModelBase overrides
|
||||
|
||||
void validate() override;
|
||||
|
||||
nlohmann::json toJson() const override;
|
||||
void fromJson(const nlohmann::json& json) override;
|
||||
void validate();
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// User members
|
||||
@@ -106,6 +98,8 @@ public:
|
||||
bool userStatusIsSet() const;
|
||||
void unsetUserStatus();
|
||||
|
||||
friend void to_json(nlohmann::json& j, const User& o);
|
||||
friend void from_json(const nlohmann::json& j, User& o);
|
||||
protected:
|
||||
int64_t m_Id;
|
||||
bool m_IdIsSet;
|
||||
|
||||
Reference in New Issue
Block a user