cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Fix Swagger-UI for Karaf wrap feature with parameters, patch from Christian Lutz applied, This closes #228
Date Fri, 27 Jan 2017 14:17:15 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 7da059f88 -> eccca31cc


Fix Swagger-UI for Karaf wrap feature with parameters, patch from Christian Lutz applied,
This closes #228


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/eccca31c
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/eccca31c
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/eccca31c

Branch: refs/heads/master
Commit: eccca31ccbaae506fec99642c5320c3bf312af55
Parents: 7da059f
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Fri Jan 27 14:16:56 2017 +0000
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Fri Jan 27 14:16:56 2017 +0000

----------------------------------------------------------------------
 .../java/org/apache/cxf/jaxrs/swagger/OsgiSwaggerUiResolver.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/eccca31c/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/OsgiSwaggerUiResolver.java
----------------------------------------------------------------------
diff --git a/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/OsgiSwaggerUiResolver.java
b/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/OsgiSwaggerUiResolver.java
index 434595c..0272407 100644
--- a/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/OsgiSwaggerUiResolver.java
+++ b/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/OsgiSwaggerUiResolver.java
@@ -50,7 +50,9 @@ public class OsgiSwaggerUiResolver extends SwaggerUiResolver {
                             return getSwaggerUiRoot(b, swaggerUiVersion);
                         }
                     } else  if (location.startsWith(pattern)) {
-                        swaggerUiVersion = location.substring(pattern.length());
+                        int dollarIndex = location.indexOf("$");
+                        swaggerUiVersion = location.substring(pattern.length(),
+                                dollarIndex > pattern.length() ? dollarIndex : location.length());
                         return getSwaggerUiRoot(b, swaggerUiVersion);
                     }
                 }


Mime
View raw message