Added error handling in yang_path_arg triggered by no filter in get paginated

Fixed cornercase of restconf error return when no body
Fixed cornercase when exactly / given as xpath
Better error message when YANG not found: added which YANG file imports it
This commit is contained in:
Olof hagsand 2021-11-09 20:02:40 +01:00
parent a4b4dc97ce
commit 2dcc14a0db
9 changed files with 39 additions and 14 deletions

View file

@ -467,7 +467,7 @@ get_list_pagination(clicon_handle h,
#endif
/* Check if list/leaf-list */
if (yang_path_arg(yspec, xpath, &ylist) < 0)
if (yang_path_arg(yspec, xpath?xpath:"/", &ylist) < 0)
goto done;
if (ylist == NULL){
if ((cbmsg = cbuf_new()) == NULL){