[C++][Pistache] Fixed #2643 (#2653)

* 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:
SalDiAngelus
2019-04-19 08:00:12 -04:00
committed by sunn
parent cce35d75a4
commit 89eb603c17
37 changed files with 266 additions and 932 deletions

View File

@@ -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;