Extended generation of method attributes (#142)

This commit is contained in:
Bartek Kryza
2023-05-29 23:19:28 +02:00
parent 75b900bf46
commit 097f7a11ed
13 changed files with 158 additions and 11 deletions

View File

@@ -55,8 +55,12 @@ std::string method_parameter::to_string(
auto name_ns =
using_namespace.relative(common::model::namespace_{name()}.to_string());
if (default_value().empty())
if (default_value().empty()) {
if (name_ns.empty())
return type_ns;
return fmt::format("{} {}", type_ns, name_ns);
}
return fmt::format("{} {} = {}", type_ns, name_ns, default_value());
}