* Restconf top-level operations GET root resource modified to comply with

RFC 8040 Sec 3.1
  * non-pretty print remove all spaces, eg `{"operations":{"clixon-example:client-rpc":[null]`
  * Replaced JSON `null` with `[null]` as proper empty JSON leaf/leaf-list encoding.
* [Cannot write to config using restconf example #91](https://github.com/clicon/clixon/issues/91)
  * Updated restconf documentation (the example was wrong)
* [clixon-lib yang revision file name update #92](https://github.com/clicon/clixon/issues/92)
  * Clixon-lib yang file had conflicting filename and internal yang revision.
  * This was only detected in the use-case when a whole dir was loaded.
  * Inserted sanity check in all yang parse routines.
  * Committed updated clixon-lib yang file that triggered the error
This commit is contained in:
Olof hagsand 2019-08-24 15:30:43 +02:00
parent a8906fd0bd
commit 6df434093e
12 changed files with 230 additions and 192 deletions

View file

@ -1028,7 +1028,7 @@ xml2json_vec(FILE *f,
int retval = 1;
cbuf *cb = NULL;
if ((cb = cbuf_new()) ==NULL){
if ((cb = cbuf_new()) == NULL){
clicon_err(OE_XML, errno, "cbuf_new");
goto done;
}
@ -1084,7 +1084,8 @@ json_xmlns_translate(yang_stmt *yspec,
if (xml2ns(x, NULL, &namespace0) < 0)
goto done;
/* Set xmlns="" default namespace attribute (if diff from default) */
if (namespace0==NULL || strcmp(namespace0, namespace)){
if (namespace0 == NULL ||
strcmp(namespace0, namespace)){
if (xmlns_set(x, NULL, namespace) < 0)
goto done;
/* and remove prefix */