[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: HTML File NETCONF-1101-remove-POST    
Issue Links:
Blocks
blocks NETCONF-1054 OpenApi: POST examples are incorrect Resolved

 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.


Generated at Wed Feb 07 20:16:40 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.