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.
- blocks
-
NETCONF-1054 OpenApi: POST examples are incorrect
- Resolved