Added patch media types; restconf patch test-cases; nsc spelling

This commit is contained in:
Olof hagsand 2019-08-09 14:49:40 +02:00
parent f319c18374
commit e244f5c8f8
12 changed files with 212 additions and 37 deletions

View file

@ -193,6 +193,8 @@ api_data_get2(clicon_handle h,
if (xml2json_cbuf(cbx, xret, pretty) < 0)
goto done;
break;
default:
break;
}
}
else{
@ -244,6 +246,8 @@ api_data_get2(clicon_handle h,
if (xml2json_cbuf_vec(cbx, xvec, xlen, pretty) < 0)
goto done;
break;
default:
break;
}
}
clicon_debug(1, "%s cbuf:%s", __FUNCTION__, cbuf_get(cbx));
@ -391,6 +395,8 @@ api_operations_get(clicon_handle h,
case YANG_DATA_JSON:
cprintf(cbx, "{\"operations\": {");
break;
default:
break;
}
ymod = NULL;
i = 0;
@ -409,7 +415,10 @@ api_operations_get(clicon_handle h,
cprintf(cbx, ",");
cprintf(cbx, "\"%s:%s\": null", yang_argument_get(ymod), yang_argument_get(yc));
break;
default:
break;
}
}
}
switch (media_out){
@ -419,6 +428,8 @@ api_operations_get(clicon_handle h,
case YANG_DATA_JSON:
cprintf(cbx, "}}");
break;
default:
break;
}
FCGX_SetExitStatus(200, r->out); /* OK */
FCGX_FPrintF(r->out, "Content-Type: %s\r\n", restconf_media_int2str(media_out));