Reduce use of getDataChildByName()
[netconf.git] / restconf / sal-rest-docgen / src / main / java / org / opendaylight / netconf / sal / rest / doc / impl / MountPointSwaggerGeneratorDraft02.java
index 43f8e8fac5e92033a2e3c7e67e88b5820d836547..6843bfa790a184301460f555cf2c4438c79604c9 100644 (file)
@@ -7,10 +7,9 @@
  */
 package org.opendaylight.netconf.sal.rest.doc.impl;
 
-import java.util.Objects;
 import java.util.Optional;
-import org.opendaylight.controller.md.sal.dom.api.DOMMountPointService;
-import org.opendaylight.controller.sal.core.api.model.SchemaService;
+import org.opendaylight.mdsal.dom.api.DOMMountPointService;
+import org.opendaylight.mdsal.dom.api.DOMSchemaService;
 import org.opendaylight.netconf.sal.rest.doc.mountpoints.MountPointSwagger;
 
 /**
@@ -22,8 +21,16 @@ public class MountPointSwaggerGeneratorDraft02 extends BaseYangSwaggerGeneratorD
 
     private final MountPointSwagger mountPointSwagger;
 
-    public MountPointSwaggerGeneratorDraft02(SchemaService schemaService, DOMMountPointService mountService) {
-        super(Optional.of(Objects.requireNonNull(schemaService)));
+    public MountPointSwaggerGeneratorDraft02(final DOMSchemaService schemaService,
+            final DOMMountPointService mountService) {
+        super(Optional.of(schemaService));
+        mountPointSwagger = new MountPointSwagger(schemaService, mountService, this);
+        mountPointSwagger.init();
+    }
+
+    public MountPointSwaggerGeneratorDraft02(final DOMSchemaService schemaService,
+            final DOMMountPointService mountService, final String basePath) {
+        super(Optional.of(schemaService), basePath);
         mountPointSwagger = new MountPointSwagger(schemaService, mountService, this);
         mountPointSwagger.init();
     }