Skip to content

Commit 2429ddf

Browse files
fixup
1 parent f1da7eb commit 2429ddf

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tesseract_common/src/property_tree_demo.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ PropertyTree buildConfigSchema()
1212
auto& cfg = schema.get("config");
1313
cfg.setAttribute("description", "Main config for plugin");
1414
cfg.setAttribute("required", true);
15+
std::map<int, std::string> return_options;
16+
return_options[0] = "Error";
17+
return_options[1] = "Successful";
18+
cfg.setAttribute("return_options", YAML::Node(return_options));
19+
cfg.addValidator(validateRequired);
1520

1621
// conditional
1722
{
@@ -20,7 +25,7 @@ PropertyTree buildConfigSchema()
2025
prop.setAttribute("default", true);
2126
prop.setAttribute("description", "Enable conditional execution");
2227
prop.setAttribute("required", true);
23-
// node.addValidator(validateRange);
28+
prop.addValidator(validateRequired);
2429
}
2530
// inputs
2631
{

0 commit comments

Comments
 (0)