[NETCONF-1101] OpenApi: Remove incorrect list POST requests Created: 26/Jul/23 Updated: 31/Oct/23 Resolved: 31/Oct/23 |
|
| Status: | Resolved |
| Project: | netconf |
| Component/s: | restconf-openapi |
| Affects Version/s: | None |
| Fix Version/s: | 7.0.0, 4.0.9, 6.0.5, 5.0.10 |
| Type: | Bug | Priority: | Medium |
| Reporter: | Ivan Hrasko | Assignee: | Samuel Schneider |
| Resolution: | Done | Votes: | 0 |
| Labels: | pt | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
With the model: container container {
list list {
key "name address";
leaf name {
type string;
}
leaf address {
type string;
}
}
}
We are getting two POST requests to create list entry: 1. /rests/data/network-topology:network-topology/topology=topology-netconf/node=17830-sim-device/yang-ext:mount/test:container with payload: {
"list": [
{
"name": "Some name",
"address": "Some address"
}
]
}
Which works fine and is in accordance with general logic that POST request creates child resource. 2. /rests/data/network-topology:network-topology/topology=topology-netconf/node=17830-sim-device/yang-ext:mount/test:container/list={name},{address} with payload: {
"name": "Some name",
"address": "Some address"
}
Which fails with: Error parsing json input: Failed to create new parse result data. Are you creating multiple resources/subresources in POST request? Remove the option #2 even if it works for one item keys. |