[NETCONF-272] Api explorer does not handle nodes with same name in yang module properly Created: 09/Sep/16  Updated: 15/Mar/19  Resolved: 13/Oct/16

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

Type: Bug
Reporter: Miroslav Kovac Assignee: Miroslav Kovac
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issue Links:
Blocks
blocks NETCONF-278 API Explorer Model Schema Data Type '... Resolved
External issue ID: 6679

 Description   

If there are two or more Containers (Lists and others as well) with same name in one yang module, example is not rendered properly. It always takes the last one and render example based on that.
e.g.:
module -->

container jukebox {
container library {
list artist {
key name;

leaf name {
type string

{ length "1 .. max"; }

}

list song {
key name;

leaf name {
type string

{ length "1 .. max"; }

}
leaf location

{ type string; mandatory true; }

leaf format

{ type string; }

leaf length

{ type uint32; }

} // end list 'song'
} // end list 'artist'
} // end library

list playlist {
key name;

leaf name

{ type string; }

list song {
key index;

leaf index

{ type uint32; }

leaf id {
type leafref

{ path "/jbox:jukebox/jbox:library/jbox:artist/" + "jbox:album/jbox:song/jbox:name"; }

mandatory true;
}
} // end song
} //end playlist
}// end jukebox

example generated -->
{
"jukebox": {
"library": {
"artist": [
{
"song": [ <---- wrongly generated song. should contain name,location,format,length

{ "index": "integer", "id": "object" }

],
"name": "string"
}
]
},
"playlist": [
{
"song": [

{ "index": "integer", "id": "object" }

],
"name": "string",
}
]
}
}



 Comments   
Comment by Miroslav Kovac [ 11/Oct/16 ]

https://git.opendaylight.org/gerrit/#/c/46751/

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