Bug 6679 - api explorer creates false examples 51/46751/3
authormiroslav.kovac <miroslav.kovac@pantheon.tech>
Mon, 10 Oct 2016 16:53:01 +0000 (18:53 +0200)
committermiroslav.kovac <miroslav.kovac@pantheon.tech>
Wed, 12 Oct 2016 07:43:10 +0000 (09:43 +0200)
commit9c15778ec0f42719fa98f60e84288f12ed85aafa
tree56a5261788351ce276b734b44dfcd3d9a3aae764
parent1927682ff5f558c9120aafbf68bee75a5d5cfb07
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