[NETCONF-227] swagger ui does not pass multiple bodies to server Created: 19/Jul/16  Updated: 27/Mar/23

Status: Confirmed
Project: netconf
Component/s: restconf-nb
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: moon.lee Assignee: Ivan Hrasko
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Linux
Platform: PC


External issue ID: 6207

 Description   

swagger ui can not pass multiple bodies to server when using operation post and url like "http://localhost:8181/restconf/config/..../moduleName:containerName"

swagger-ui.js

for (_j = 0, _len1 = _ref6.length; _j < _len1; _j++) {
o = _ref6[_j];
if ((o.value != null) && jQuery.trim(o.value).length > 0)

{ map["body"] = o.value; }

}

the body map would be overwritted is multiple bodies.



 Comments   
Comment by Ivan Hrasko [ 19/Jul/16 ]

Can you give me example with multiple bodies, please?

I dont think that map['body'] is overwritted. Rather it is checked if value which will be set is not null and not empty.

Comment by moon.lee [ 20/Jul/16 ]

(In reply to Ivan Hrasko from comment #1)
> Can you give me example with multiple bodies, please?
>
> I dont think that map['body'] is overwritted. Rather it is checked if value
> which will be set is not null and not empty.

map['body'] is overwritted if one container node contains two or more list or container nodes .

example is as follows:

module router {
yang-version 1;
namespace "urn:sdnhub:odl:tutorial:router";
prefix router;

description "Router configuration";

revision "2015-07-28"

{ description "Initial version."; }

container router {
list ospf {
key process-id;
leaf process-id

{ type uint32; }
list networks {
key subnet-ip;


leaf subnet-ip { type string; }
leaf area-id { type uint32; }
}
}
list bgp {
key as-number;
leaf as-number { type uint32; }

leaf router-id

{ type string; }

list neighbors {
key as-number;
leaf as-number

{ type uint32; }

leaf peer-ip

{ type string; }

}
}
}
}

Comment by Ivan Hrasko [ 21/Jul/16 ]

OK, thank you

Comment by Ivan Hrasko [ 28/Jul/16 ]

Can I ask you for the POST request you are trying to send to server?

Comment by Robert Varga [ 27/Aug/18 ]

li.yue23@zte.com.cn can you provide the requested input? Otherwise we'll close this issue as Cannot Reproduce.

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