cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r1557036 - /cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/swagger/SwaggerFeature.java
Date Fri, 10 Jan 2014 05:39:13 GMT
Author: ffang
Date: Fri Jan 10 05:39:13 2014
New Revision: 1557036

URL: http://svn.apache.org/r1557036
Log:
[CXF-5488]make basePath in SwaggerFeature configurable

Modified:
    cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/swagger/SwaggerFeature.java

Modified: cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/swagger/SwaggerFeature.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/swagger/SwaggerFeature.java?rev=1557036&r1=1557035&r2=1557036&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/swagger/SwaggerFeature.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/swagger/SwaggerFeature.java
Fri Jan 10 05:39:13 2014
@@ -75,8 +75,10 @@ public class SwaggerFeature extends Abst
     }
     
     private void calulateDefaultBasePath(Server server) {
-        String address = server.getEndpoint().getEndpointInfo().getAddress();
-        setBasePath(address + "/api-docs");
+        if (getBasePath() == null || getBasePath().length() == 0) {
+            String address = server.getEndpoint().getEndpointInfo().getAddress();
+            setBasePath(address + "/api-docs");
+        }
     }
     public String getResourcePackage() {
         return resourcePackage;



Mime
View raw message