+ BeanConfig config = new BeanConfig();
+ config.setTitle(" Console Service rest API");
+ config.setVersion("1.0.0");
+ config.setResourcePackage("org.onap.vfc.nfvo.emsdriver.northbound.service");
+ //swagger rest api basepath
+ SimpleServerFactory simpleServerFactory = (SimpleServerFactory)configuration.getServerFactory();
+ String basePath = simpleServerFactory.getApplicationContextPath();
+ String rootPath = simpleServerFactory.getJerseyRootPath().get();
+ rootPath = rootPath.substring(0, rootPath.indexOf("/*"));
+ basePath = basePath.equals("/") ? rootPath : (new StringBuilder()).append(basePath).append(rootPath).toString();
+ config.setBasePath(basePath);
+ config.setScan(true);
+ }
+