Change return value of Schema::childNodes
I'll need to use this method to generate what can be parsed as paths in
the upcoming path parser rework. As a side effect, path completion
generation gets a little bit simpler, because now I don't have to parse
the strings of format "[module:]node" and just trust whatever the schema
gives me.
Change-Id: I881cdbbd8254b846c21cee1ac0a3b7af1e40a696
diff --git a/src/ast_handlers.hpp b/src/ast_handlers.hpp
index 5f7b922..2a1b360 100644
--- a/src/ast_handlers.hpp
+++ b/src/ast_handlers.hpp
@@ -461,27 +461,20 @@
auto suggestions = schema.availableNodes(parserContext.currentSchemaPath(), Recursion::NonRecursive);
std::set<Completion> suffixesAdded;
std::transform(suggestions.begin(), suggestions.end(),
- std::inserter(suffixesAdded, suffixesAdded.end()),
- [&parserContext, &schema] (auto it) {
- ModuleNodePair node;
- if (auto colonPos = it.find(":"); colonPos != it.npos) {
- node.first = it.substr(0, colonPos);
- node.second = it.substr(colonPos + 1, node.second.npos);
- } else {
- node.first = boost::none;
- node.second = it;
- }
+ std::inserter(suffixesAdded, suffixesAdded.end()),
+ [&parserContext, &schema](const ModuleNodePair& node) {
+ std::string completion = (node.first ? *node.first + ":" : "") + node.second;
- if (schema.isLeaf(parserContext.currentSchemaPath(), node)) {
- return Completion{it + " "};
- }
- if (schema.isContainer(parserContext.currentSchemaPath(), node)) {
- return Completion{it + "/"};
- }
- if (schema.isList(parserContext.currentSchemaPath(), node)) {
- return Completion{it, "[", Completion::WhenToAdd::IfFullMatch};
- }
- return Completion{it};
+ if (schema.isLeaf(parserContext.currentSchemaPath(), node)) {
+ return Completion{completion + " "};
+ }
+ if (schema.isContainer(parserContext.currentSchemaPath(), node)) {
+ return Completion{completion + "/"};
+ }
+ if (schema.isList(parserContext.currentSchemaPath(), node)) {
+ return Completion{completion, "[", Completion::WhenToAdd::IfFullMatch};
+ }
+ return Completion{completion};
});
parserContext.m_suggestions = suffixesAdded;
}
diff --git a/src/interpreter.cpp b/src/interpreter.cpp
index 9912584..0a4f59e 100644
--- a/src/interpreter.cpp
+++ b/src/interpreter.cpp
@@ -76,7 +76,7 @@
recursion = Recursion::Recursive;
}
- std::set<std::string> toPrint;
+ std::set<ModuleNodePair> toPrint;
auto pathArg = dataPathToSchemaPath(m_parser.currentPath());
if (ls.m_path) {
@@ -95,8 +95,9 @@
toPrint = m_datastore.schema()->availableNodes(pathArg, recursion);
}
- for (const auto& it : toPrint)
- std::cout << it << std::endl;
+ for (const auto& it : toPrint) {
+ std::cout << (it.first ? *it.first + ":" : "" ) + it.second << std::endl;
+ }
}
void Interpreter::operator()(const copy_& copy) const
diff --git a/src/schema.hpp b/src/schema.hpp
index 4dd9a2a..052386e 100644
--- a/src/schema.hpp
+++ b/src/schema.hpp
@@ -70,5 +70,5 @@
virtual std::optional<std::string> description(const std::string& location) const = 0;
virtual yang::Status status(const std::string& location) const = 0;
- virtual std::set<std::string> availableNodes(const boost::variant<dataPath_, schemaPath_, module_>& path, const Recursion recursion) const = 0;
+ virtual std::set<ModuleNodePair> availableNodes(const boost::variant<dataPath_, schemaPath_, module_>& path, const Recursion recursion) const = 0;
};
diff --git a/src/static_schema.cpp b/src/static_schema.cpp
index 2f1dcb2..082d03b 100644
--- a/src/static_schema.cpp
+++ b/src/static_schema.cpp
@@ -135,19 +135,28 @@
return boost::get<yang::leaf>(children(locationString).at(node)).m_type;
}
-std::set<std::string> StaticSchema::availableNodes(const boost::variant<dataPath_, schemaPath_, module_>& path, const Recursion recursion) const
+ModuleNodePair splitModuleNode(const std::string& input)
+{
+ auto colonLocation = input.find_first_of(':');
+ if (colonLocation != std::string::npos) {
+ return ModuleNodePair{input.substr(0, colonLocation), input.substr(colonLocation + 1)};
+ }
+ throw std::logic_error("Tried to split a string without a colon (StaticSchema node names should always be stored with prefixes)");
+}
+
+std::set<ModuleNodePair> StaticSchema::availableNodes(const boost::variant<dataPath_, schemaPath_, module_>& path, const Recursion recursion) const
{
if (recursion == Recursion::Recursive) {
throw std::logic_error("Recursive StaticSchema::availableNodes is not implemented. It shouldn't be used in tests.");
}
- std::set<std::string> res;
+ std::set<ModuleNodePair> res;
if (path.type() == typeid(module_)) {
auto topLevelNodes = m_nodes.at("");
auto modulePlusColon = boost::get<module_>(path).m_name + ":";
for (const auto& it : topLevelNodes) {
if (boost::algorithm::starts_with(it.first, modulePlusColon)) {
- res.insert(it.first);
+ res.insert(splitModuleNode(it.first));
}
}
return res;
@@ -160,7 +169,9 @@
auto childrenRef = children(locationString);
- std::transform(childrenRef.begin(), childrenRef.end(), std::inserter(res, res.end()), [](auto it) { return it.first; });
+ std::transform(childrenRef.begin(), childrenRef.end(), std::inserter(res, res.end()), [](const auto& it) {
+ return splitModuleNode(it.first);
+ });
return res;
}
diff --git a/src/static_schema.hpp b/src/static_schema.hpp
index 43f7b8d..67bd7b9 100644
--- a/src/static_schema.hpp
+++ b/src/static_schema.hpp
@@ -57,7 +57,7 @@
yang::TypeInfo leafType(const std::string& path) const override;
std::optional<std::string> leafTypeName(const std::string& path) const override;
std::string leafrefPath(const std::string& leafrefPath) const override;
- std::set<std::string> availableNodes(const boost::variant<dataPath_, schemaPath_, module_>& path, const Recursion recursion) const override;
+ std::set<ModuleNodePair> availableNodes(const boost::variant<dataPath_, schemaPath_, module_>& path, const Recursion recursion) const override;
std::optional<std::string> description(const std::string& path) const override;
yang::Status status(const std::string& location) const override;
diff --git a/src/yang_schema.cpp b/src/yang_schema.cpp
index 80ec7f3..2c8b30d 100644
--- a/src/yang_schema.cpp
+++ b/src/yang_schema.cpp
@@ -320,10 +320,10 @@
return res;
}
-std::set<std::string> YangSchema::availableNodes(const boost::variant<dataPath_, schemaPath_, module_>& path, const Recursion recursion) const
+std::set<ModuleNodePair> YangSchema::availableNodes(const boost::variant<dataPath_, schemaPath_, module_>& path, const Recursion recursion) const
{
using namespace std::string_view_literals;
- std::set<std::string> res;
+ std::set<ModuleNodePair> res;
std::vector<libyang::S_Schema_Node> nodes;
std::string topLevelModule;
@@ -351,15 +351,14 @@
continue;
if (recursion == Recursion::Recursive) {
for (auto it : node->tree_dfs()) {
- res.insert(it->path(LYS_PATH_FIRST_PREFIX));
+ res.insert(ModuleNodePair(boost::none, it->path(LYS_PATH_FIRST_PREFIX)));
}
} else {
- std::string toInsert;
+ ModuleNodePair toInsert;
if (topLevelModule.empty() || topLevelModule != node->module()->name()) {
- toInsert += node->module()->name();
- toInsert += ":";
+ toInsert.first = node->module()->name();
}
- toInsert += node->name();
+ toInsert.second = node->name();
res.insert(toInsert);
}
}
diff --git a/src/yang_schema.hpp b/src/yang_schema.hpp
index 9395ba2..2a93b07 100644
--- a/src/yang_schema.hpp
+++ b/src/yang_schema.hpp
@@ -43,7 +43,7 @@
yang::TypeInfo leafType(const std::string& path) const override;
std::optional<std::string> leafTypeName(const std::string& path) const override;
std::string leafrefPath(const std::string& leafrefPath) const override;
- std::set<std::string> availableNodes(const boost::variant<dataPath_, schemaPath_, module_>& path, const Recursion recursion) const override;
+ std::set<ModuleNodePair> availableNodes(const boost::variant<dataPath_, schemaPath_, module_>& path, const Recursion recursion) const override;
std::optional<std::string> description(const std::string& path) const override;
yang::Status status(const std::string& location) const override;
diff --git a/tests/ls_interpreter.cpp b/tests/ls_interpreter.cpp
index 6b02d80..a78194e 100644
--- a/tests/ls_interpreter.cpp
+++ b/tests/ls_interpreter.cpp
@@ -149,6 +149,6 @@
REQUIRE_CALL(datastore, schema()).RETURN(schema);
ls_ ls;
ls.m_path = lsArg;
- REQUIRE_CALL(*schema, availableNodes(expectedPath, Recursion::NonRecursive)).RETURN(std::set<std::string>{});
+ REQUIRE_CALL(*schema, availableNodes(expectedPath, Recursion::NonRecursive)).RETURN(std::set<ModuleNodePair>{});
Interpreter(parser, datastore)(ls);
}
diff --git a/tests/yang.cpp b/tests/yang.cpp
index c3ceb25..cdb200e 100644
--- a/tests/yang.cpp
+++ b/tests/yang.cpp
@@ -784,56 +784,61 @@
// TODO: merge "path" and "module" sections and add recursive versions to the path section
SECTION("paths")
{
- std::set<std::string> set;
+ std::set<ModuleNodePair> set;
+ using namespace std::string_literals;
SECTION("<root>")
{
- set = {"example-schema:a", "example-schema:b", "example-schema:leafString",
- "example-schema:leafDecimal", "example-schema:leafBool",
- "example-schema:leafInt8", "example-schema:leafUint8",
- "example-schema:leafInt16", "example-schema:leafUint16",
- "example-schema:leafInt32", "example-schema:leafUint32",
- "example-schema:leafInt64", "example-schema:leafUint64",
- "example-schema:leafEnum", "example-schema:leafEnumTypedef",
- "example-schema:leafEnumTypedefRestricted", "example-schema:leafEnumTypedefRestricted2",
- "example-schema:foodIdentLeaf", "example-schema:pizzaIdentLeaf", "example-schema:foodDrinkIdentLeaf",
- "example-schema:_list", "example-schema:twoKeyList", "second-schema:bla",
- "example-schema:carry", "example-schema:zero", "example-schema:direction",
- "example-schema:interrupt",
- "example-schema:ethernet", "example-schema:loopback",
- "example-schema:pizzaSize",
- "example-schema:length", "example-schema:wavelength",
- "example-schema:duration", "example-schema:another-duration",
- "example-schema:activeNumber",
- "example-schema:numberOrString",
- "example-schema:portSettings",
- "example-schema:portMapping",
- "example-schema:activeMappedPort",
- "example-schema:activePort",
- "example-schema:clockSpeed",
- "example-schema:deprecatedLeaf",
- "example-schema:obsoleteLeaf",
- "example-schema:obsoleteLeafWithDeprecatedType",
- "example-schema:obsoleteLeafWithObsoleteType",
- "example-schema:systemStats"};
+ set = {{"example-schema"s, "a"}, {"example-schema"s, "b"}, {"example-schema"s, "leafString"},
+ {"example-schema"s, "leafDecimal"}, {"example-schema"s, "leafBool"},
+ {"example-schema"s, "leafInt8"}, {"example-schema"s, "leafUint8"},
+ {"example-schema"s, "leafInt16"}, {"example-schema"s, "leafUint16"},
+ {"example-schema"s, "leafInt32"}, {"example-schema"s, "leafUint32"},
+ {"example-schema"s, "leafInt64"}, {"example-schema"s, "leafUint64"},
+ {"example-schema"s, "leafEnum"}, {"example-schema"s, "leafEnumTypedef"},
+ {"example-schema"s, "leafEnumTypedefRestricted"}, {"example-schema"s, "leafEnumTypedefRestricted2"},
+ {"example-schema"s, "foodIdentLeaf"}, {"example-schema"s, "pizzaIdentLeaf"}, {"example-schema"s, "foodDrinkIdentLeaf"},
+ {"example-schema"s, "_list"}, {"example-schema"s, "twoKeyList"}, {"second-schema"s, "bla"},
+ {"example-schema"s, "carry"}, {"example-schema"s, "zero"}, {"example-schema"s, "direction"},
+ {"example-schema"s, "interrupt"},
+ {"example-schema"s, "ethernet"}, {"example-schema"s, "loopback"},
+ {"example-schema"s, "pizzaSize"},
+ {"example-schema"s, "length"}, {"example-schema"s, "wavelength"},
+ {"example-schema"s, "duration"}, {"example-schema"s, "another-duration"},
+ {"example-schema"s, "activeNumber"},
+ {"example-schema"s, "numberOrString"},
+ {"example-schema"s, "portSettings"},
+ {"example-schema"s, "portMapping"},
+ {"example-schema"s, "activeMappedPort"},
+ {"example-schema"s, "activePort"},
+ {"example-schema"s, "clockSpeed"},
+ {"example-schema"s, "deprecatedLeaf"},
+ {"example-schema"s, "obsoleteLeaf"},
+ {"example-schema"s, "obsoleteLeafWithDeprecatedType"},
+ {"example-schema"s, "obsoleteLeafWithObsoleteType"},
+ {"example-schema"s, "systemStats"}};
}
SECTION("example-schema:a")
{
path.m_nodes.push_back(schemaNode_(module_{"example-schema"}, container_("a")));
- set = {"a2", "leafa", "second-schema:augmentedContainer"};
- }
-
- SECTION("second-schema:bla")
- {
- path.m_nodes.push_back(schemaNode_(module_{"second-schema"}, container_("bla")));
- set = {"bla2"};
+ set = {
+ {boost::none, "a2"},
+ {boost::none, "leafa"},
+ {"second-schema"s, "augmentedContainer"}
+ };
}
SECTION("example-schema:ethernet")
{
path.m_nodes.push_back(schemaNode_(module_{"example-schema"}, container_("ethernet")));
- set = {"ip"};
+ set = {{boost::none, "ip"}};
+ }
+
+ SECTION("second-schema:bla")
+ {
+ path.m_nodes.push_back(schemaNode_(module_{"second-schema"}, container_("bla")));
+ set = {{boost::none, "bla2"}};
}
REQUIRE(ys.availableNodes(path, Recursion::NonRecursive) == set);
@@ -842,130 +847,131 @@
SECTION("modules")
{
std::string module;
- std::set<std::string> expectedNonRecursive;
- std::set<std::string> expectedRecursive;
+ std::set<ModuleNodePair> expectedNonRecursive;
+ std::set<ModuleNodePair> expectedRecursive;
+ using namespace std::string_literals;
SECTION("example-schema")
{
module = "example-schema";
expectedNonRecursive = {
- "example-schema:_list",
- "example-schema:a",
- "example-schema:activeMappedPort",
- "example-schema:activeNumber",
- "example-schema:activePort",
- "example-schema:another-duration",
- "example-schema:b",
- "example-schema:carry",
- "example-schema:clockSpeed",
- "example-schema:deprecatedLeaf",
- "example-schema:direction",
- "example-schema:duration",
- "example-schema:ethernet",
- "example-schema:foodDrinkIdentLeaf",
- "example-schema:foodIdentLeaf",
- "example-schema:interrupt",
- "example-schema:leafBool",
- "example-schema:leafDecimal",
- "example-schema:leafEnum",
- "example-schema:leafEnumTypedef",
- "example-schema:leafEnumTypedefRestricted",
- "example-schema:leafEnumTypedefRestricted2",
- "example-schema:leafInt16",
- "example-schema:leafInt32",
- "example-schema:leafInt64",
- "example-schema:leafInt8",
- "example-schema:leafString",
- "example-schema:leafUint16",
- "example-schema:leafUint32",
- "example-schema:leafUint64",
- "example-schema:leafUint8",
- "example-schema:length",
- "example-schema:loopback",
- "example-schema:numberOrString",
- "example-schema:obsoleteLeaf",
- "example-schema:obsoleteLeafWithDeprecatedType",
- "example-schema:obsoleteLeafWithObsoleteType",
- "example-schema:pizzaIdentLeaf",
- "example-schema:pizzaSize",
- "example-schema:portMapping",
- "example-schema:portSettings",
- "example-schema:systemStats",
- "example-schema:twoKeyList",
- "example-schema:wavelength",
- "example-schema:zero"
+ {"example-schema"s, "_list"},
+ {"example-schema"s, "a"},
+ {"example-schema"s, "activeMappedPort"},
+ {"example-schema"s, "activeNumber"},
+ {"example-schema"s, "activePort"},
+ {"example-schema"s, "another-duration"},
+ {"example-schema"s, "b"},
+ {"example-schema"s, "carry"},
+ {"example-schema"s, "clockSpeed"},
+ {"example-schema"s, "deprecatedLeaf"},
+ {"example-schema"s, "direction"},
+ {"example-schema"s, "duration"},
+ {"example-schema"s, "ethernet"},
+ {"example-schema"s, "foodDrinkIdentLeaf"},
+ {"example-schema"s, "foodIdentLeaf"},
+ {"example-schema"s, "interrupt"},
+ {"example-schema"s, "leafBool"},
+ {"example-schema"s, "leafDecimal"},
+ {"example-schema"s, "leafEnum"},
+ {"example-schema"s, "leafEnumTypedef"},
+ {"example-schema"s, "leafEnumTypedefRestricted"},
+ {"example-schema"s, "leafEnumTypedefRestricted2"},
+ {"example-schema"s, "leafInt16"},
+ {"example-schema"s, "leafInt32"},
+ {"example-schema"s, "leafInt64"},
+ {"example-schema"s, "leafInt8"},
+ {"example-schema"s, "leafString"},
+ {"example-schema"s, "leafUint16"},
+ {"example-schema"s, "leafUint32"},
+ {"example-schema"s, "leafUint64"},
+ {"example-schema"s, "leafUint8"},
+ {"example-schema"s, "length"},
+ {"example-schema"s, "loopback"},
+ {"example-schema"s, "numberOrString"},
+ {"example-schema"s, "obsoleteLeaf"},
+ {"example-schema"s, "obsoleteLeafWithDeprecatedType"},
+ {"example-schema"s, "obsoleteLeafWithObsoleteType"},
+ {"example-schema"s, "pizzaIdentLeaf"},
+ {"example-schema"s, "pizzaSize"},
+ {"example-schema"s, "portMapping"},
+ {"example-schema"s, "portSettings"},
+ {"example-schema"s, "systemStats"},
+ {"example-schema"s, "twoKeyList"},
+ {"example-schema"s, "wavelength"},
+ {"example-schema"s, "zero"}
};
expectedRecursive = {
- "/example-schema:_list",
- "/example-schema:_list/contInList",
- "/example-schema:_list/number",
- "/example-schema:a",
- "/example-schema:a/a2",
- "/example-schema:a/a2/a3",
- "/example-schema:a/leafa",
- "/example-schema:a/second-schema:augmentedContainer",
- "/example-schema:activeMappedPort",
- "/example-schema:activeNumber",
- "/example-schema:activePort",
- "/example-schema:another-duration",
- "/example-schema:b",
- "/example-schema:b/b2",
- "/example-schema:b/b2/b3",
- "/example-schema:carry",
- "/example-schema:clockSpeed",
- "/example-schema:deprecatedLeaf",
- "/example-schema:direction",
- "/example-schema:duration",
- "/example-schema:foodDrinkIdentLeaf",
- "/example-schema:foodIdentLeaf",
- "/example-schema:interface/caseEthernet/ethernet",
- "/example-schema:interface/caseEthernet/ethernet/ip",
- "/example-schema:interface/caseLoopback/loopback",
- "/example-schema:interface/caseLoopback/loopback/ip",
- "/example-schema:interrupt",
- "/example-schema:leafBool",
- "/example-schema:leafDecimal",
- "/example-schema:leafEnum",
- "/example-schema:leafEnumTypedef",
- "/example-schema:leafEnumTypedefRestricted",
- "/example-schema:leafEnumTypedefRestricted2",
- "/example-schema:leafInt16",
- "/example-schema:leafInt32",
- "/example-schema:leafInt64",
- "/example-schema:leafInt8",
- "/example-schema:leafString",
- "/example-schema:leafUint16",
- "/example-schema:leafUint32",
- "/example-schema:leafUint64",
- "/example-schema:leafUint8",
- "/example-schema:length",
- "/example-schema:numberOrString",
- "/example-schema:obsoleteLeaf",
- "/example-schema:obsoleteLeafWithDeprecatedType",
- "/example-schema:obsoleteLeafWithObsoleteType",
- "/example-schema:pizzaIdentLeaf",
- "/example-schema:pizzaSize",
- "/example-schema:portMapping",
- "/example-schema:portMapping/port",
- "/example-schema:portSettings",
- "/example-schema:portSettings/port",
- "/example-schema:systemStats",
- "/example-schema:systemStats/upTime",
- "/example-schema:twoKeyList",
- "/example-schema:twoKeyList/name",
- "/example-schema:twoKeyList/number",
- "/example-schema:wavelength",
- "/example-schema:zero"
+ {boost::none, "/example-schema:_list"},
+ {boost::none, "/example-schema:_list/contInList"},
+ {boost::none, "/example-schema:_list/number"},
+ {boost::none, "/example-schema:a"},
+ {boost::none, "/example-schema:a/a2"},
+ {boost::none, "/example-schema:a/a2/a3"},
+ {boost::none, "/example-schema:a/leafa"},
+ {boost::none, "/example-schema:a/second-schema:augmentedContainer"},
+ {boost::none, "/example-schema:activeMappedPort"},
+ {boost::none, "/example-schema:activeNumber"},
+ {boost::none, "/example-schema:activePort"},
+ {boost::none, "/example-schema:another-duration"},
+ {boost::none, "/example-schema:b"},
+ {boost::none, "/example-schema:b/b2"},
+ {boost::none, "/example-schema:b/b2/b3"},
+ {boost::none, "/example-schema:carry"},
+ {boost::none, "/example-schema:clockSpeed"},
+ {boost::none, "/example-schema:deprecatedLeaf"},
+ {boost::none, "/example-schema:direction"},
+ {boost::none, "/example-schema:duration"},
+ {boost::none, "/example-schema:foodDrinkIdentLeaf"},
+ {boost::none, "/example-schema:foodIdentLeaf"},
+ {boost::none, "/example-schema:interface/caseEthernet/ethernet"},
+ {boost::none, "/example-schema:interface/caseEthernet/ethernet/ip"},
+ {boost::none, "/example-schema:interface/caseLoopback/loopback"},
+ {boost::none, "/example-schema:interface/caseLoopback/loopback/ip"},
+ {boost::none, "/example-schema:interrupt"},
+ {boost::none, "/example-schema:leafBool"},
+ {boost::none, "/example-schema:leafDecimal"},
+ {boost::none, "/example-schema:leafEnum"},
+ {boost::none, "/example-schema:leafEnumTypedef"},
+ {boost::none, "/example-schema:leafEnumTypedefRestricted"},
+ {boost::none, "/example-schema:leafEnumTypedefRestricted2"},
+ {boost::none, "/example-schema:leafInt16"},
+ {boost::none, "/example-schema:leafInt32"},
+ {boost::none, "/example-schema:leafInt64"},
+ {boost::none, "/example-schema:leafInt8"},
+ {boost::none, "/example-schema:leafString"},
+ {boost::none, "/example-schema:leafUint16"},
+ {boost::none, "/example-schema:leafUint32"},
+ {boost::none, "/example-schema:leafUint64"},
+ {boost::none, "/example-schema:leafUint8"},
+ {boost::none, "/example-schema:length"},
+ {boost::none, "/example-schema:numberOrString"},
+ {boost::none, "/example-schema:obsoleteLeaf"},
+ {boost::none, "/example-schema:obsoleteLeafWithDeprecatedType"},
+ {boost::none, "/example-schema:obsoleteLeafWithObsoleteType"},
+ {boost::none, "/example-schema:pizzaIdentLeaf"},
+ {boost::none, "/example-schema:pizzaSize"},
+ {boost::none, "/example-schema:portMapping"},
+ {boost::none, "/example-schema:portMapping/port"},
+ {boost::none, "/example-schema:portSettings"},
+ {boost::none, "/example-schema:portSettings/port"},
+ {boost::none, "/example-schema:systemStats"},
+ {boost::none, "/example-schema:systemStats/upTime"},
+ {boost::none, "/example-schema:twoKeyList"},
+ {boost::none, "/example-schema:twoKeyList/name"},
+ {boost::none, "/example-schema:twoKeyList/number"},
+ {boost::none, "/example-schema:wavelength"},
+ {boost::none, "/example-schema:zero"}
};
}
-
SECTION("second-schema")
{
module = "second-schema";
expectedNonRecursive = {
- "second-schema:bla"
+ {"second-schema"s, "bla"}
};
expectedRecursive = {
- "/second-schema:bla", "/second-schema:bla/bla2"
+ {boost::none, "/second-schema:bla"},
+ {boost::none, "/second-schema:bla/bla2"}
};
}