forked from loafle/openapi-generator-original
Fix not processing enums in cpp-pistache-server (#8886)
* Fix not processing enums in cpp-pistache-server Defining a reusable enum as a component schema results in an empty class. Following changes are made: - activate 'postProcessModelsEnum' in 'AbstractCppCodegen' - modify model templates for the 'cpp-pistache-server' project As 'postProcessModelsEnum' is now available in the 'AbstactCppCodegen' the 'enumVars' variables are now available in mustache templates for all cpp based code generators. As the 'AbstractCppCodegen' was touched all cpp based samples were updated. * fixes encountered on real world * PR fixes Co-authored-by: mfyuce <mfyuce@netas.com.tr>
This commit is contained in:
@@ -59,6 +59,7 @@ void to_json(nlohmann::json& j, const Order& o)
|
||||
j["status"] = o.m_Status;
|
||||
if(o.completeIsSet())
|
||||
j["complete"] = o.m_Complete;
|
||||
|
||||
}
|
||||
|
||||
void from_json(const nlohmann::json& j, Order& o)
|
||||
@@ -93,6 +94,7 @@ void from_json(const nlohmann::json& j, Order& o)
|
||||
j.at("complete").get_to(o.m_Complete);
|
||||
o.m_CompleteIsSet = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
int64_t Order::getId() const
|
||||
@@ -198,6 +200,7 @@ void Order::unsetComplete()
|
||||
m_CompleteIsSet = false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user