[ 
https://issues.apache.org/jira/browse/CXF-7512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16495012#comment-16495012
 ] 

ASF GitHub Bot commented on CXF-7512:
-------------------------------------

reta commented on a change in pull request #315: [CXF-7512] Support searching 
swaggerUi by name and version in all bun…
URL: https://github.com/apache/cxf/pull/315#discussion_r191723521
 
 

 ##########
 File path: 
rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/SwaggerUiResolver.java
 ##########
 @@ -87,12 +74,22 @@ protected static String checkUiRoot(String urlStr, String 
swaggerUiVersion) {
     }
 
     public static String findSwaggerUiRoot(String 
swaggerUiMavenGroupAndArtifact, 
-                                           String swaggerUiVersion) {
-        String root = 
HELPER.findSwaggerUiRootInternal(swaggerUiMavenGroupAndArtifact, 
-                                                       swaggerUiVersion);
-        if (root == null && HELPER.getClass() != SwaggerUiResolver.class) {
-            root = new 
SwaggerUiResolver().findSwaggerUiRootInternal(swaggerUiMavenGroupAndArtifact, 
-                                                                     
swaggerUiVersion);
+                                           String swaggerUiName, String 
swaggerUiVersion) {
+        String root = null;
+        try {
+            root = new OsgiSwaggerUiResolver()
+                .findSwaggerUiRoot(swaggerUiMavenGroupAndArtifact, 
swaggerUiVersion);
+        } catch (Throwable e) {
+            // Ignore
+        }
+        try {
 
 Review comment:
   Should it be wrapped into `if (root == null) { ... }` block (if previous 
lookup succeeded)?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Swagger UI does not work for CXF-DOSGi mutli bundle distro
> ----------------------------------------------------------
>
>                 Key: CXF-7512
>                 URL: https://issues.apache.org/jira/browse/CXF-7512
>             Project: CXF
>          Issue Type: Bug
>            Reporter: Christian Schneider
>            Assignee: Sergey Beryozkin
>            Priority: Major
>
> In karaf the swagger UI works fine but not in the multi bundle distro.
> The bug is in org.apache.cxf.jaxrs.swagger.OsgiSwaggerUiResolver. There the 
> swagger UI is detected. Unfortunately the detection is based on the bundle 
> location and only works for maven uri based deployments. As the mutli bundle 
> distro is deployed using files it fails.
> I will change the detection to scan for the swagger webbundle by detecting 
> the signature resource /META-INF/resources/swagger-ui. This approach should 
> make the detection more robust regarding different packagings and deployments.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to