Pulled the RPC query out of the data schema loop, so that 75/11475/1
authorDavid K. Bainbridge <dbainbri@ciena.com>
Tue, 23 Sep 2014 03:35:45 +0000 (20:35 -0700)
committerDavid K. Bainbridge <dbainbri@ciena.com>
Tue, 23 Sep 2014 04:22:35 +0000 (21:22 -0700)
modules that only contain RPCs will also be picked up.

Signed-off-by: David K. Bainbridge <dbainbri@ciena.com>
Change-Id: I63981d2126209263a762acbc190f4ad15f4dd725

opendaylight/md-sal/sal-rest-docgen/src/main/java/org/opendaylight/controller/sal/rest/doc/impl/BaseYangSwaggerGenerator.java

index 5d0f361..4d567bd 100644 (file)
@@ -173,12 +173,12 @@ public class BaseYangSwaggerGenerator {
                 resourcePath = getDataStorePath("/operational/", context);
                 addApis(node, apis, resourcePath, pathParams, schemaContext, false);
             }
+        }
 
-            Set<RpcDefinition> rpcs = m.getRpcs();
-            for (RpcDefinition rpcDefinition : rpcs) {
-                String resourcePath = getDataStorePath("/operations/", context);
-                addRpcs(rpcDefinition, apis, resourcePath, schemaContext);
-            }
+        Set<RpcDefinition> rpcs = m.getRpcs();
+        for (RpcDefinition rpcDefinition : rpcs) {
+            String resourcePath = getDataStorePath("/operations/", context);
+            addRpcs(rpcDefinition, apis, resourcePath, schemaContext);
         }
 
         _logger.debug("Number of APIs found [{}]", apis.size());

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.