Bug 6679 - api explorer creates false examples 13/51713/1
authormiroslav.kovac <miroslav.kovac@pantheon.tech>
Mon, 10 Oct 2016 16:53:01 +0000 (18:53 +0200)
committerJakub Toth <jatoth@cisco.com>
Sat, 11 Feb 2017 01:33:04 +0000 (02:33 +0100)
commit75b2cc3618533699eecf3eefa2aa2b9f10763766
tree18c7f27f01f50b2332b29b80c5111eef21608fe8
parent74f910a3441f84558bb223cde6d44cbf17c05432
Bug 6679 - api explorer creates false examples

Api explorer created false examples when yang has two data nodes with
same name in different containers or lists. It compared name of data
nodes rather than whole path to the data node which result to creting
examples of same types even if they should be different.

Fix examples by comparing the path to data node rather than just name
of the node.

Change-Id: I6f73fb37985fc78ad67ecc466ebfdfe569d7cd8d
Signed-off-by: miroslav.kovac <miroslav.kovac@pantheon.tech>
restconf/sal-rest-docgen/src/main/java/org/opendaylight/netconf/sal/rest/doc/impl/BaseYangSwaggerGenerator.java
restconf/sal-rest-docgen/src/main/java/org/opendaylight/netconf/sal/rest/doc/impl/ModelGenerator.java
restconf/sal-rest-docgen/src/main/java/org/opendaylight/netconf/sal/rest/doc/model/builder/OperationBuilder.java
restconf/sal-rest-docgen/src/test/java/org/opendaylight/controller/sal/rest/doc/impl/ApiDocGeneratorTest.java