Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

restconf GET json response does not encode top level node with namespace as per rfc #303

Closed
DeekshaBhandary opened this issue Feb 16, 2022 · 2 comments

Comments

@DeekshaBhandary
Copy link

curl -i --request GET http://localhost:8040/restconf/data --header 'Content-Type: application/yang-data+json'
HTTP/1.1 200 OK
Cache-Control: no-cache
Content-Type: application/yang-data+json
Status: 200 OK
Date: Wed, 16 Feb 2022 10:07:31 GMT
Transfer-Encoding: chunked

{
  "data": {              <---------------- namespace missing
    "rtbrick-config:system": {
      "load-last-config": "true"
    }
    ```
@olofhagsand
Copy link
Member

Patch submitted. Please verify.

olofhagsand added a commit that referenced this issue Feb 22, 2022
…node with namespace as per rfc #303](#303)

  * Load/save JSON config file did not work
* Added rfc7951 parameter to `clixon_json_parse_string()` and `clixon_json_parse_file()`
  * If set, honor RFC 7951: JSON Encoding of Data Modeled with YANG, eg it requires module name prefixes
  * If not set, parse as regular JSON
* Test: added test_db.sh for datastore format tests
@DeekshaBhandary
Copy link
Author

Issue is fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants