summaryrefslogtreecommitdiffstats
path: root/vpp-integration/api-docs
diff options
context:
space:
mode:
Diffstat (limited to 'vpp-integration/api-docs')
-rw-r--r--vpp-integration/api-docs/core/pom.xml4
-rw-r--r--vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/ModelTypeIndex.java2
-rw-r--r--vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/YangModelKey.java11
3 files changed, 13 insertions, 4 deletions
diff --git a/vpp-integration/api-docs/core/pom.xml b/vpp-integration/api-docs/core/pom.xml
index d0b7454c8..aa2fc6316 100644
--- a/vpp-integration/api-docs/core/pom.xml
+++ b/vpp-integration/api-docs/core/pom.xml
@@ -92,6 +92,10 @@
<version>${honeycomb.version}</version>
</dependency>
<dependency>
+ <groupId>org.opendaylight.mdsal</groupId>
+ <artifactId>yang-binding</artifactId>
+ </dependency>
+ <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
diff --git a/vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/ModelTypeIndex.java b/vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/ModelTypeIndex.java
index 9fd5976b7..f12c2e606 100644
--- a/vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/ModelTypeIndex.java
+++ b/vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/ModelTypeIndex.java
@@ -41,7 +41,7 @@ class ModelTypeIndex {
ModelTypeIndex() throws IOException {
namespaceToModuleIndex = collectAllModules(this.getClass().getClassLoader())
.stream()
- .collect(toMap(YangModelKey::new, YangModuleInfo::getName));
+ .collect(toMap(YangModelKey::new, yangModuleInfo -> yangModuleInfo.getName().toString()));
}
private static YangModelBindingProvider getModuleBindingProviderInstance(final Class<?> aClass) {
diff --git a/vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/YangModelKey.java b/vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/YangModelKey.java
index 2bc5bc5da..a2d4b9d06 100644
--- a/vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/YangModelKey.java
+++ b/vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/YangModelKey.java
@@ -14,15 +14,20 @@
* limitations under the License.
*/
-package io.fd.hc2vpp.docs.core;import org.opendaylight.yangtools.yang.binding.YangModuleInfo;
+package io.fd.hc2vpp.docs.core;
+
+import java.util.Optional;
+import org.opendaylight.yangtools.yang.binding.YangModuleInfo;
+import org.opendaylight.yangtools.yang.common.Revision;
final class YangModelKey {
private final String namespace;
private final String revision;
YangModelKey(final YangModuleInfo moduleInfo) {
- this.namespace = moduleInfo.getNamespace();
- this.revision = moduleInfo.getRevision();
+ this.namespace = moduleInfo.getName().getNamespace().toString();
+ Optional<Revision> optRevision = moduleInfo.getName().getRevision();
+ this.revision = optRevision.isPresent() ? optRevision.get().toString() : "";
}
YangModelKey(final String namespace, final String revision) {