Details
-
Bug
-
Status: Resolved
-
Medium
-
Resolution: Won't Do
-
None
-
None
Description
Data that is sent via yang-patch is validated in a different way than sending it via simple PUT/POST request:
{
"ietf-restconf:yang-patch": {
"patch-id": "patch-1",
"edit": [
{
"edit-id": "edit1",
"operation": "replace",
"target": "/",
"value": {
<config>
}
}
]
}
}
Opendaylight returns following error when data is sent via yang-patch:
{
"errors": {
"error": [
{
"error-type": "protocol",
"error-tag": "malformed-message",
"error-message": "Error parsing json input: Expected BEGIN_OBJECT but was NUMBER at line 22 column 63 path $.ietf-restconf:yang-patch.edit[0].value.<...>",
"error-info": "Expected BEGIN_OBJECT but was NUMBER at line 22 column 63 path $.ietf-restconf:yang-patch.edit[0].value.data[0].<...>"
}
]
}
}
For yang-patch all NUMBERS / BOOLEAN-values needs to be converted in order that it is acceppted from Opendaylight.
"Simple" PUT / POST request accepts different types of values (number / boolean).