Uploaded image for project: 'netconf'
  1. netconf
  2. NETCONF-1101

OpenApi: Remove incorrect list POST requests

XMLWordPrintable

      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.

            SamoSchneider Samuel Schneider
            ivanhrasko Ivan Hrasko
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: