Fixed root namespace handling

This commit is contained in:
Bartek Kryza
2022-06-18 17:48:57 +02:00
parent bb689db81a
commit c82002e8ee
9 changed files with 55 additions and 24 deletions

View File

@@ -215,10 +215,10 @@ void get_option<clanguml::common::model::namespace_>(const Node &node,
{
if (node[option.name]) {
if (node[option.name].Type() == NodeType::Scalar)
option.set(node[option.name].template as<std::string>());
option.set({node[option.name].template as<std::string>()});
else if (node[option.name].Type() == NodeType::Sequence)
option.set(
node[option.name].template as<std::vector<std::string>>()[0]);
option.set({
node[option.name].template as<std::vector<std::string>>()[0]});
else
throw std::runtime_error("Invalid using_namespace value");
}
@@ -406,7 +406,7 @@ template <> struct convert<filter> {
auto namespace_list =
node["namespaces"].as<std::vector<std::string>>();
for (const auto &ns : namespace_list)
rhs.namespaces.push_back(ns);
rhs.namespaces.push_back({ns});
}
if (node["relationships"])