libyang CHANGE add config virtual node to ietf-netconf
Refs cesnet/netopeer2#347
diff --git a/src/printer_json_schema.c b/src/printer_json_schema.c
index 364a533..1190222 100644
--- a/src/printer_json_schema.c
+++ b/src/printer_json_schema.c
@@ -1093,6 +1093,11 @@
{
struct lys_node_anydata *any = (struct lys_node_anydata *)node;
+ if (!lys_parent(node) && !strcmp(node->name, "config") && !strcmp(node->module->name, "ietf-netconf")) {
+ /* node added by libyang, not actually in the model */
+ return;
+ }
+
jsons_print_object(out, node->name, "nodetype", jsons_nodetype_str(node->nodetype), 0, first);
ly_print(out, ",\"module\":\"%s\"", lys_main_module(node->module)->name);
if (node->module->type) {