Rename *Swagger* classes to *OpenApi* 97/105697/7
authorIvan Hrasko <ivan.hrasko@pantheon.tech>
Wed, 26 Apr 2023 07:26:57 +0000 (09:26 +0200)
committerRobert Varga <nite@hq.sk>
Wed, 3 May 2023 14:34:21 +0000 (14:34 +0000)
We are in process of removing support for OpenApi 2 (aka Swagger).
As a preparation rename the majority of swagger classes to openapi
classes.

We will eliminate the remaining SwaggerObject class in next patch.

JIRA: NETCONF-984
Change-Id: I848314da6d8f2a4a5efe3ebc8dcf7b0cd46fee53
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
restconf/sal-rest-docgen/src/main/java/org/opendaylight/netconf/sal/rest/doc/impl/ApiDocGeneratorRFC8040.java
restconf/sal-rest-docgen/src/main/java/org/opendaylight/netconf/sal/rest/doc/impl/ApiDocServiceImpl.java
restconf/sal-rest-docgen/src/main/java/org/opendaylight/netconf/sal/rest/doc/impl/BaseYangOpenApiGenerator.java [moved from restconf/sal-rest-docgen/src/main/java/org/opendaylight/netconf/sal/rest/doc/impl/BaseYangSwaggerGenerator.java with 99% similarity]
restconf/sal-rest-docgen/src/main/java/org/opendaylight/netconf/sal/rest/doc/impl/BaseYangOpenApiGeneratorRFC8040.java [moved from restconf/sal-rest-docgen/src/main/java/org/opendaylight/netconf/sal/rest/doc/impl/BaseYangSwaggerGeneratorRFC8040.java with 88% similarity]
restconf/sal-rest-docgen/src/main/java/org/opendaylight/netconf/sal/rest/doc/impl/DefinitionGenerator.java
restconf/sal-rest-docgen/src/main/java/org/opendaylight/netconf/sal/rest/doc/impl/MountPointOpenApiGeneratorRFC8040.java [moved from restconf/sal-rest-docgen/src/main/java/org/opendaylight/netconf/sal/rest/doc/impl/MountPointSwaggerGeneratorRFC8040.java with 62% similarity]
restconf/sal-rest-docgen/src/main/java/org/opendaylight/netconf/sal/rest/doc/mountpoints/MountPointOpenApi.java [moved from restconf/sal-rest-docgen/src/main/java/org/opendaylight/netconf/sal/rest/doc/mountpoints/MountPointSwagger.java with 90% similarity]
restconf/sal-rest-docgen/src/test/java/org/opendaylight/netconf/sal/rest/doc/impl/ApiDocServiceImplTest.java
restconf/sal-rest-docgen/src/test/java/org/opendaylight/netconf/sal/rest/doc/impl/MountPointOpenApiTest.java [moved from restconf/sal-rest-docgen/src/test/java/org/opendaylight/netconf/sal/rest/doc/impl/MountPointSwaggerTest.java with 81% similarity]

index 5d80043416484f1eed44b79de73937596a0cb04f..128233d380d991cb2fe55bf7155eedf930fdfc8d 100644 (file)
@@ -16,7 +16,7 @@ import org.opendaylight.mdsal.dom.api.DOMSchemaService;
  *
  * @author Thomas Pantelis
  */
-public class ApiDocGeneratorRFC8040 extends BaseYangSwaggerGeneratorRFC8040 {
+public class ApiDocGeneratorRFC8040 extends BaseYangOpenApiGeneratorRFC8040 {
     public ApiDocGeneratorRFC8040(final DOMSchemaService schemaService) {
         super(Optional.of(schemaService));
     }
index 151b8b48eb96e310bef0587948d3acd148115c51..8106e93a0d703bbe7112c4bd36ce7a6e96081d57 100644 (file)
@@ -20,7 +20,7 @@ import javax.ws.rs.core.UriInfo;
 import org.opendaylight.mdsal.dom.api.DOMMountPointService;
 import org.opendaylight.mdsal.dom.api.DOMSchemaService;
 import org.opendaylight.netconf.sal.rest.doc.api.ApiDocService;
-import org.opendaylight.netconf.sal.rest.doc.mountpoints.MountPointSwagger;
+import org.opendaylight.netconf.sal.rest.doc.mountpoints.MountPointOpenApi;
 import org.opendaylight.netconf.sal.rest.doc.openapi.CommonApiObject;
 import org.opendaylight.netconf.sal.rest.doc.openapi.MountPointInstance;
 import org.opendaylight.netconf.sal.rest.doc.openapi.SwaggerObject;
@@ -51,21 +51,21 @@ public final class ApiDocServiceImpl implements ApiDocService {
     // Query parameter
     private static final String PAGE_NUM = "pageNum";
 
-    private final MountPointSwagger mountPointSwaggerRFC8040;
+    private final MountPointOpenApi mountPointOpenApiRFC8040;
     private final ApiDocGeneratorRFC8040 apiDocGeneratorRFC8040;
 
     @Inject
     @Activate
     public ApiDocServiceImpl(final @Reference DOMSchemaService schemaService,
                              final @Reference DOMMountPointService mountPointService) {
-        this(new MountPointSwaggerGeneratorRFC8040(schemaService, mountPointService),
+        this(new MountPointOpenApiGeneratorRFC8040(schemaService, mountPointService),
             new ApiDocGeneratorRFC8040(schemaService));
     }
 
     @VisibleForTesting
-    ApiDocServiceImpl(final MountPointSwaggerGeneratorRFC8040 mountPointSwaggerGeneratorRFC8040,
+    ApiDocServiceImpl(final MountPointOpenApiGeneratorRFC8040 mountPointOpenApiGeneratorRFC8040,
                       final ApiDocGeneratorRFC8040 apiDocGeneratorRFC8040) {
-        mountPointSwaggerRFC8040 = requireNonNull(mountPointSwaggerGeneratorRFC8040).getMountPointSwagger();
+        mountPointOpenApiRFC8040 = requireNonNull(mountPointOpenApiGeneratorRFC8040).getMountPointOpenApi();
         this.apiDocGeneratorRFC8040 = requireNonNull(apiDocGeneratorRFC8040);
     }
 
@@ -74,7 +74,7 @@ public final class ApiDocServiceImpl implements ApiDocService {
         final DefinitionNames definitionNames = new DefinitionNames();
         final SwaggerObject doc = apiDocGeneratorRFC8040.getAllModulesDoc(uriInfo, definitionNames);
 
-        return Response.ok(BaseYangSwaggerGenerator.convertToOpenApi(doc)).build();
+        return Response.ok(BaseYangOpenApiGenerator.convertToOpenApi(doc)).build();
     }
 
     /**
@@ -97,7 +97,7 @@ public final class ApiDocServiceImpl implements ApiDocService {
 
     @Override
     public synchronized Response getListOfMounts(final UriInfo uriInfo) {
-        final List<MountPointInstance> entity = mountPointSwaggerRFC8040
+        final List<MountPointInstance> entity = mountPointOpenApiRFC8040
                 .getInstanceIdentifiers().entrySet().stream()
                 .map(MountPointInstance::new).collect(Collectors.toList());
         return Response.ok(entity).build();
@@ -106,7 +106,7 @@ public final class ApiDocServiceImpl implements ApiDocService {
     @Override
     public synchronized Response getMountDocByModule(final String instanceNum, final String module,
                                                      final String revision, final UriInfo uriInfo) {
-        final CommonApiObject api = mountPointSwaggerRFC8040.getMountPointApi(uriInfo, Long.parseLong(instanceNum),
+        final CommonApiObject api = mountPointOpenApiRFC8040.getMountPointApi(uriInfo, Long.parseLong(instanceNum),
             module, revision);
         return Response.ok(api).build();
     }
@@ -117,7 +117,7 @@ public final class ApiDocServiceImpl implements ApiDocService {
         final String stringPageNum = uriInfo.getQueryParameters().getFirst(PAGE_NUM);
         final Optional<Integer> pageNum = stringPageNum != null ? Optional.of(Integer.valueOf(stringPageNum))
                 : Optional.empty();
-        api = mountPointSwaggerRFC8040.getMountPointApi(uriInfo, Long.parseLong(instanceNum), pageNum);
+        api = mountPointOpenApiRFC8040.getMountPointApi(uriInfo, Long.parseLong(instanceNum), pageNum);
         return Response.ok(api).build();
     }
 }
similarity index 99%
rename from restconf/sal-rest-docgen/src/main/java/org/opendaylight/netconf/sal/rest/doc/impl/BaseYangSwaggerGenerator.java
rename to restconf/sal-rest-docgen/src/main/java/org/opendaylight/netconf/sal/rest/doc/impl/BaseYangOpenApiGenerator.java
index 2cf7a070cc47463c6d92c6d7db66cbd6b43320fa..97a461cbbba60ad3bc40600e11087c9b7c71e4d3 100644 (file)
@@ -69,9 +69,9 @@ import org.opendaylight.yangtools.yang.model.api.RpcDefinition;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public abstract class BaseYangSwaggerGenerator {
+public abstract class BaseYangOpenApiGenerator {
 
-    private static final Logger LOG = LoggerFactory.getLogger(BaseYangSwaggerGenerator.class);
+    private static final Logger LOG = LoggerFactory.getLogger(BaseYangOpenApiGenerator.class);
 
     private static final String API_VERSION = "1.0.0";
     private static final String SWAGGER_VERSION = "2.0";
@@ -97,7 +97,7 @@ public abstract class BaseYangSwaggerGenerator {
         MAPPER.configure(SerializationFeature.INDENT_OUTPUT, true);
     }
 
-    protected BaseYangSwaggerGenerator(final Optional<DOMSchemaService> schemaService) {
+    protected BaseYangOpenApiGenerator(final Optional<DOMSchemaService> schemaService) {
         this.schemaService = schemaService.orElse(null);
     }
 
@@ -17,14 +17,14 @@ import org.opendaylight.mdsal.dom.api.DOMSchemaService;
  *
  * @author Thomas Pantelis
  */
-public abstract class BaseYangSwaggerGeneratorRFC8040 extends BaseYangSwaggerGenerator {
+public abstract class BaseYangOpenApiGeneratorRFC8040 extends BaseYangOpenApiGenerator {
     private final String basePath;
 
-    protected BaseYangSwaggerGeneratorRFC8040(final Optional<DOMSchemaService> schemaService) {
+    protected BaseYangOpenApiGeneratorRFC8040(final Optional<DOMSchemaService> schemaService) {
         this(schemaService, "rests");
     }
 
-    protected BaseYangSwaggerGeneratorRFC8040(final Optional<DOMSchemaService> schemaService, final String basePath) {
+    protected BaseYangOpenApiGeneratorRFC8040(final Optional<DOMSchemaService> schemaService, final String basePath) {
         super(schemaService);
         this.basePath = requireNonNull(basePath);
     }
index e0df9921950f4a39a0ea31aa5d6b62fa273eba45..cda0ca3f708edffb339ca84c4bda6d2f15a62b14 100644 (file)
@@ -7,7 +7,7 @@
  */
 package org.opendaylight.netconf.sal.rest.doc.impl;
 
-import static org.opendaylight.netconf.sal.rest.doc.impl.BaseYangSwaggerGenerator.MODULE_NAME_SUFFIX;
+import static org.opendaylight.netconf.sal.rest.doc.impl.BaseYangOpenApiGenerator.MODULE_NAME_SUFFIX;
 import static org.opendaylight.netconf.sal.rest.doc.model.builder.OperationBuilder.COMPONENTS_PREFIX;
 import static org.opendaylight.netconf.sal.rest.doc.model.builder.OperationBuilder.CONFIG;
 import static org.opendaylight.netconf.sal.rest.doc.model.builder.OperationBuilder.NAME_KEY;
@@ -10,36 +10,36 @@ package org.opendaylight.netconf.sal.rest.doc.impl;
 import java.util.Optional;
 import org.opendaylight.mdsal.dom.api.DOMMountPointService;
 import org.opendaylight.mdsal.dom.api.DOMSchemaService;
-import org.opendaylight.netconf.sal.rest.doc.mountpoints.MountPointSwagger;
+import org.opendaylight.netconf.sal.rest.doc.mountpoints.MountPointOpenApi;
 
 /**
  * MountPoint generator implementation for RFC 8040.
  *
  * @author Thomas Pantelis
  */
-public class MountPointSwaggerGeneratorRFC8040 extends BaseYangSwaggerGeneratorRFC8040 implements AutoCloseable {
-    private final MountPointSwagger mountPointSwagger;
+public class MountPointOpenApiGeneratorRFC8040 extends BaseYangOpenApiGeneratorRFC8040 implements AutoCloseable {
+    private final MountPointOpenApi mountPointOpenApi;
 
-    public MountPointSwaggerGeneratorRFC8040(final DOMSchemaService schemaService,
+    public MountPointOpenApiGeneratorRFC8040(final DOMSchemaService schemaService,
             final DOMMountPointService mountService) {
         super(Optional.of(schemaService));
-        mountPointSwagger = new MountPointSwagger(schemaService, mountService, this);
-        mountPointSwagger.init();
+        mountPointOpenApi = new MountPointOpenApi(schemaService, mountService, this);
+        mountPointOpenApi.init();
     }
 
-    public MountPointSwaggerGeneratorRFC8040(final DOMSchemaService schemaService,
+    public MountPointOpenApiGeneratorRFC8040(final DOMSchemaService schemaService,
             final DOMMountPointService mountService, final String basePath) {
         super(Optional.of(schemaService), basePath);
-        mountPointSwagger = new MountPointSwagger(schemaService, mountService, this);
-        mountPointSwagger.init();
+        mountPointOpenApi = new MountPointOpenApi(schemaService, mountService, this);
+        mountPointOpenApi.init();
     }
 
-    public MountPointSwagger getMountPointSwagger() {
-        return mountPointSwagger;
+    public MountPointOpenApi getMountPointOpenApi() {
+        return mountPointOpenApi;
     }
 
     @Override
     public void close() {
-        mountPointSwagger.close();
+        mountPointOpenApi.close();
     }
 }
similarity index 90%
rename from restconf/sal-rest-docgen/src/main/java/org/opendaylight/netconf/sal/rest/doc/mountpoints/MountPointSwagger.java
rename to restconf/sal-rest-docgen/src/main/java/org/opendaylight/netconf/sal/rest/doc/mountpoints/MountPointOpenApi.java
index 9a0076b7f3dbce3bc6333ae0f91f7bdb64af58e1..1b5f1c140391627c2c20900017f41b7673f234da 100644 (file)
@@ -10,7 +10,7 @@ package org.opendaylight.netconf.sal.rest.doc.mountpoints;
 import static com.google.common.base.Preconditions.checkState;
 import static java.util.Objects.requireNonNull;
 import static org.opendaylight.netconf.sal.rest.doc.impl.ApiDocServiceImpl.DEFAULT_PAGESIZE;
-import static org.opendaylight.netconf.sal.rest.doc.impl.BaseYangSwaggerGenerator.BASE_PATH;
+import static org.opendaylight.netconf.sal.rest.doc.impl.BaseYangOpenApiGenerator.BASE_PATH;
 import static org.opendaylight.netconf.sal.rest.doc.model.builder.OperationBuilder.DESCRIPTION_KEY;
 import static org.opendaylight.netconf.sal.rest.doc.model.builder.OperationBuilder.RESPONSES_KEY;
 import static org.opendaylight.netconf.sal.rest.doc.model.builder.OperationBuilder.SUMMARY_KEY;
@@ -34,7 +34,7 @@ import javax.ws.rs.core.UriInfo;
 import org.opendaylight.mdsal.dom.api.DOMMountPointListener;
 import org.opendaylight.mdsal.dom.api.DOMMountPointService;
 import org.opendaylight.mdsal.dom.api.DOMSchemaService;
-import org.opendaylight.netconf.sal.rest.doc.impl.BaseYangSwaggerGenerator;
+import org.opendaylight.netconf.sal.rest.doc.impl.BaseYangOpenApiGenerator;
 import org.opendaylight.netconf.sal.rest.doc.impl.DefinitionNames;
 import org.opendaylight.netconf.sal.rest.doc.openapi.CommonApiObject;
 import org.opendaylight.netconf.sal.rest.doc.openapi.SwaggerObject;
@@ -47,16 +47,16 @@ import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class MountPointSwagger implements DOMMountPointListener, AutoCloseable {
+public class MountPointOpenApi implements DOMMountPointListener, AutoCloseable {
 
-    private static final Logger LOG = LoggerFactory.getLogger(MountPointSwagger.class);
+    private static final Logger LOG = LoggerFactory.getLogger(MountPointOpenApi.class);
 
     private static final String DATASTORES_REVISION = "-";
     private static final String DATASTORES_LABEL = "Datastores";
 
     private final DOMSchemaService globalSchema;
     private final DOMMountPointService mountService;
-    private final BaseYangSwaggerGenerator swaggerGenerator;
+    private final BaseYangOpenApiGenerator openApiGenerator;
     private final Map<YangInstanceIdentifier, Long> instanceIdToLongId =
             new TreeMap<>((o1, o2) -> o1.toString().compareToIgnoreCase(o2.toString()));
     private final Map<Long, YangInstanceIdentifier> longIdToInstanceId = new HashMap<>();
@@ -67,11 +67,11 @@ public class MountPointSwagger implements DOMMountPointListener, AutoCloseable {
 
     private ListenerRegistration<DOMMountPointListener> registration;
 
-    public MountPointSwagger(final DOMSchemaService globalSchema, final DOMMountPointService mountService,
-            final BaseYangSwaggerGenerator swaggerGenerator) {
+    public MountPointOpenApi(final DOMSchemaService globalSchema, final DOMMountPointService mountService,
+            final BaseYangOpenApiGenerator openApiGenerator) {
         this.globalSchema = requireNonNull(globalSchema);
         this.mountService = requireNonNull(mountService);
-        this.swaggerGenerator = requireNonNull(swaggerGenerator);
+        this.openApiGenerator = requireNonNull(openApiGenerator);
     }
 
     public void init() {
@@ -91,7 +91,7 @@ public class MountPointSwagger implements DOMMountPointListener, AutoCloseable {
             final SchemaContext context = globalSchema.getGlobalContext();
             for (final Entry<YangInstanceIdentifier, Long> entry : instanceIdToLongId.entrySet()) {
                 final String modName = findModuleName(entry.getKey(), context);
-                urlToId.put(swaggerGenerator.generateUrlPrefixFromInstanceID(entry.getKey(), modName),
+                urlToId.put(openApiGenerator.generateUrlPrefixFromInstanceID(entry.getKey(), modName),
                         entry.getValue());
             }
         }
@@ -110,7 +110,7 @@ public class MountPointSwagger implements DOMMountPointListener, AutoCloseable {
 
     private String getYangMountUrl(final YangInstanceIdentifier key) {
         final String modName = findModuleName(key, globalSchema.getGlobalContext());
-        return swaggerGenerator.generateUrlPrefixFromInstanceID(key, modName) + "yang-ext:mount";
+        return openApiGenerator.generateUrlPrefixFromInstanceID(key, modName) + "yang-ext:mount";
     }
 
     private YangInstanceIdentifier getInstanceId(final Long id) {
@@ -147,9 +147,9 @@ public class MountPointSwagger implements DOMMountPointListener, AutoCloseable {
         if (DATASTORES_LABEL.equals(module) && DATASTORES_REVISION.equals(revision)) {
             return generateDataStoreApiDoc(uriInfo, urlPrefix, deviceName);
         }
-        final SwaggerObject swaggerObject = swaggerGenerator.getApiDeclaration(module, revision, uriInfo, context,
+        final SwaggerObject swaggerObject = openApiGenerator.getApiDeclaration(module, revision, uriInfo, context,
                 urlPrefix);
-        return BaseYangSwaggerGenerator.convertToOpenApi(swaggerObject);
+        return BaseYangOpenApiGenerator.convertToOpenApi(swaggerObject);
     }
 
     public CommonApiObject getMountPointApi(final UriInfo uriInfo, final Long id, final Optional<Integer> pageNum) {
@@ -180,7 +180,7 @@ public class MountPointSwagger implements DOMMountPointListener, AutoCloseable {
 
         final SwaggerObject doc;
 
-        final SwaggerObject swaggerObject = swaggerGenerator.getAllModulesDoc(uriInfo, range, context,
+        final SwaggerObject swaggerObject = openApiGenerator.getAllModulesDoc(uriInfo, range, context,
                 Optional.of(deviceName), urlPrefix, definitionNames);
 
         if (includeDataStore) {
@@ -192,7 +192,7 @@ public class MountPointSwagger implements DOMMountPointListener, AutoCloseable {
             doc = swaggerObject;
         }
 
-        return BaseYangSwaggerGenerator.convertToOpenApi(doc);
+        return BaseYangOpenApiGenerator.convertToOpenApi(doc);
     }
 
     private static String extractDeviceName(final YangInstanceIdentifier iid) {
@@ -202,9 +202,9 @@ public class MountPointSwagger implements DOMMountPointListener, AutoCloseable {
 
     private SwaggerObject generateDataStoreApiDoc(final UriInfo uriInfo, final String context,
             final String deviceName) {
-        final SwaggerObject declaration = swaggerGenerator.createSwaggerObject(
-                swaggerGenerator.createSchemaFromUriInfo(uriInfo),
-                swaggerGenerator.createHostFromUriInfo(uriInfo),
+        final SwaggerObject declaration = openApiGenerator.createSwaggerObject(
+                openApiGenerator.createSchemaFromUriInfo(uriInfo),
+                openApiGenerator.createHostFromUriInfo(uriInfo),
                 BASE_PATH,
                 context);
 
@@ -234,7 +234,7 @@ public class MountPointSwagger implements DOMMountPointListener, AutoCloseable {
         final ObjectNode responses = JsonNodeFactory.instance.objectNode();
         responses.set(String.valueOf(Response.Status.OK.getStatusCode()), okResponse);
         operationObject.set(RESPONSES_KEY, responses);
-        pathsObject.set(swaggerGenerator.getResourcePath(resourceType, context), pathItem);
+        pathsObject.set(openApiGenerator.getResourcePath(resourceType, context), pathItem);
     }
 
     @Override
index 9a8d067c30f77c4e0a3cf215dfcea0bdee4dce21..c1780467b1194c0fdfe589edcae1e33bd0159e6c 100644 (file)
@@ -40,10 +40,10 @@ public final class ApiDocServiceImplTest extends AbstractApiDocTest {
 
         final DOMMountPointService service = mock(DOMMountPointService.class);
         when(service.getMountPoint(INSTANCE_ID)).thenReturn(Optional.of(mountPoint));
-        final MountPointSwaggerGeneratorRFC8040 mountPointRFC8040 =
-                new MountPointSwaggerGeneratorRFC8040(SCHEMA_SERVICE, service);
+        final MountPointOpenApiGeneratorRFC8040 mountPointRFC8040 =
+                new MountPointOpenApiGeneratorRFC8040(SCHEMA_SERVICE, service);
         final ApiDocGeneratorRFC8040 apiDocGeneratorRFC8040 = new ApiDocGeneratorRFC8040(SCHEMA_SERVICE);
-        mountPointRFC8040.getMountPointSwagger().onMountPointCreated(INSTANCE_ID);
+        mountPointRFC8040.getMountPointOpenApi().onMountPointCreated(INSTANCE_ID);
         apiDocService = new ApiDocServiceImpl(mountPointRFC8040, apiDocGeneratorRFC8040);
     }
 
similarity index 81%
rename from restconf/sal-rest-docgen/src/test/java/org/opendaylight/netconf/sal/rest/doc/impl/MountPointSwaggerTest.java
rename to restconf/sal-rest-docgen/src/test/java/org/opendaylight/netconf/sal/rest/doc/impl/MountPointOpenApiTest.java
index ebf6846f92439a49aafa20809990a7c0eeec5cfc..352a148599ef18405cdeb014ba99f822ba68f259 100644 (file)
@@ -25,12 +25,12 @@ import org.junit.Test;
 import org.opendaylight.mdsal.dom.api.DOMMountPoint;
 import org.opendaylight.mdsal.dom.api.DOMMountPointService;
 import org.opendaylight.mdsal.dom.api.DOMSchemaService;
-import org.opendaylight.netconf.sal.rest.doc.mountpoints.MountPointSwagger;
+import org.opendaylight.netconf.sal.rest.doc.mountpoints.MountPointOpenApi;
 import org.opendaylight.netconf.sal.rest.doc.openapi.SwaggerObject;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 
-public final class MountPointSwaggerTest extends AbstractApiDocTest {
+public final class MountPointOpenApiTest extends AbstractApiDocTest {
     private static final String HTTP_URL = "http://localhost/path";
     private static final YangInstanceIdentifier INSTANCE_ID = YangInstanceIdentifier.builder()
             .node(QName.create("", "nodes"))
@@ -38,7 +38,7 @@ public final class MountPointSwaggerTest extends AbstractApiDocTest {
             .nodeWithKey(QName.create("", "node"), QName.create("", "id"), "123").build();
     private static final String INSTANCE_URL = "/nodes/node=123/";
 
-    private MountPointSwagger swagger;
+    private MountPointOpenApi openApi;
 
     @Before
     public void before() {
@@ -51,28 +51,28 @@ public final class MountPointSwaggerTest extends AbstractApiDocTest {
         final DOMMountPointService service = mock(DOMMountPointService.class);
         when(service.getMountPoint(INSTANCE_ID)).thenReturn(Optional.of(mountPoint));
 
-        swagger = new MountPointSwaggerGeneratorRFC8040(SCHEMA_SERVICE, service).getMountPointSwagger();
+        openApi = new MountPointOpenApiGeneratorRFC8040(SCHEMA_SERVICE, service).getMountPointOpenApi();
     }
 
     @Test()
     public void getInstanceIdentifiers() {
-        assertEquals(0, swagger.getInstanceIdentifiers().size());
-        swagger.onMountPointCreated(INSTANCE_ID); // add this ID into the list of mount points
-        assertEquals(1, swagger.getInstanceIdentifiers().size());
-        assertEquals((Long) 1L, swagger.getInstanceIdentifiers().entrySet().iterator().next()
+        assertEquals(0, openApi.getInstanceIdentifiers().size());
+        openApi.onMountPointCreated(INSTANCE_ID); // add this ID into the list of mount points
+        assertEquals(1, openApi.getInstanceIdentifiers().size());
+        assertEquals((Long) 1L, openApi.getInstanceIdentifiers().entrySet().iterator().next()
                 .getValue());
-        assertEquals(INSTANCE_URL, swagger.getInstanceIdentifiers().entrySet().iterator().next()
+        assertEquals(INSTANCE_URL, openApi.getInstanceIdentifiers().entrySet().iterator().next()
                 .getKey());
-        swagger.onMountPointRemoved(INSTANCE_ID); // remove ID from list of mount points
-        assertEquals(0, swagger.getInstanceIdentifiers().size());
+        openApi.onMountPointRemoved(INSTANCE_ID); // remove ID from list of mount points
+        assertEquals(0, openApi.getInstanceIdentifiers().size());
     }
 
     @Test
     public void testGetDataStoreApi() throws Exception {
         final UriInfo mockInfo = DocGenTestHelper.createMockUriInfo(HTTP_URL);
-        swagger.onMountPointCreated(INSTANCE_ID); // add this ID into the list of mount points
+        openApi.onMountPointCreated(INSTANCE_ID); // add this ID into the list of mount points
 
-        final SwaggerObject mountPointApi = (SwaggerObject) swagger.getMountPointApi(mockInfo, 1L, "Datastores", "-");
+        final SwaggerObject mountPointApi = (SwaggerObject) openApi.getMountPointApi(mockInfo, 1L, "Datastores", "-");
         assertNotNull("failed to find Datastore API", mountPointApi);
 
         final ObjectNode pathsObject = mountPointApi.getPaths();