Commit cb93eb96 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Merge branch 'fix_openapi_cause' into 'develop'

Fix openapi cause

See merge request oai/cn5g/oai-cn5g-smf!148
parents 03ad3782 7abbfab6
......@@ -25,11 +25,20 @@ void Cause::validate() {
// TODO: implement validation
}
std::string Cause::getValue() const {
return cause;
}
void Cause::setValue(const std::string& value) {
cause = value;
}
void to_json(nlohmann::json& j, const Cause& o) {
j = nlohmann::json();
}
void from_json(const nlohmann::json& j, Cause& o) {}
void from_json(const nlohmann::json& j, Cause& o) {
j.get_to(o.cause);
}
} // namespace model
} // namespace smf_server
......
......@@ -45,11 +45,14 @@ class Cause {
/////////////////////////////////////////////
/// Cause members
std::string getValue() const;
void setValue(const std::string& value);
friend void to_json(nlohmann::json& j, const Cause& o);
friend void from_json(const nlohmann::json& j, Cause& o);
protected:
std::string cause;
};
} // namespace model
......
......@@ -97,10 +97,10 @@ void from_json(const nlohmann::json& j, SmContextReleaseData& o) {
}
}
Cause SmContextReleaseData::getCause() const {
std::string SmContextReleaseData::getCause() const {
return m_Cause;
}
void SmContextReleaseData::setCause(Cause const& value) {
void SmContextReleaseData::setCause(std::string const& value) {
m_Cause = value;
m_CauseIsSet = true;
}
......
......@@ -47,8 +47,8 @@ class SmContextReleaseData {
/// <summary>
///
/// </summary>
Cause getCause() const;
void setCause(Cause const& value);
std::string getCause() const;
void setCause(std::string const& value);
bool causeIsSet() const;
void unsetCause();
/// <summary>
......@@ -119,7 +119,7 @@ class SmContextReleaseData {
friend void from_json(const nlohmann::json& j, SmContextReleaseData& o);
protected:
Cause m_Cause;
std::string m_Cause;
bool m_CauseIsSet;
NgApCause m_NgApCause;
bool m_NgApCauseIsSet;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment