cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r1557035 - /cxf/trunk/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/SwaggerFeature.java
Date Fri, 10 Jan 2014 05:21:21 GMT
Author: ffang
Date: Fri Jan 10 05:21:20 2014
New Revision: 1557035

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

Modified:
    cxf/trunk/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/SwaggerFeature.java

Modified: cxf/trunk/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/SwaggerFeature.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/SwaggerFeature.java?rev=1557035&r1=1557034&r2=1557035&view=diff
==============================================================================
--- cxf/trunk/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/SwaggerFeature.java
(original)
+++ cxf/trunk/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/SwaggerFeature.java
Fri Jan 10 05:21:20 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