Make SwaggerUiResourceLocator a public class
@@ -29,10 +29,10 @@ import org.apache.cxf.common.util.StringUtils;
/**
* Swagger UI resource locator
*/
-class SwaggerUiResourceLocator {
+public class SwaggerUiResourceLocator {
private final String swaggerUiRoot;
- SwaggerUiResourceLocator(String swaggerUiRoot) {
+ public SwaggerUiResourceLocator(String swaggerUiRoot) {
this.swaggerUiRoot = swaggerUiRoot;
}
@@ -42,7 +42,7 @@ class SwaggerUiResourceLocator {
* @return Swagger UI resource URL
* @throws MalformedURLException
*/
- URL locate(String resourcePath) throws MalformedURLException {
+ public URL locate(String resourcePath) throws MalformedURLException {
if (StringUtils.isEmpty(resourcePath) || "/".equals(resourcePath)) {
resourcePath = "index.html";
}
@@ -59,7 +59,7 @@ class SwaggerUiResourceLocator {
* @param resourcePath resource path
* @return "true" if Swagger UI resource exists, "false" otherwise
*/
- boolean exists(String resourcePath) {
+ public boolean exists(String resourcePath) {
try {
// The connect() will try to locate the entry (jar file, classpath resource)
// and fail with FileNotFoundException /IOException if there is none.
