cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: [CXF-7022] Minimising a number of interface methods, adding a tad fix (with thanks to Francesco)
Date Mon, 05 Sep 2016 15:29:23 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 34e8d746e -> 364936442


[CXF-7022] Minimising a number of interface methods, adding a tad fix (with thanks to Francesco)


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

Branch: refs/heads/3.0.x-fixes
Commit: 3649364421e02c5d4adf4dc7554b12bd64e6840a
Parents: 34e8d74
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Mon Sep 5 16:10:29 2016 +0100
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Mon Sep 5 16:29:05 2016 +0100

----------------------------------------------------------------------
 .../cxf/jaxrs/swagger/DefaultSwagger2Serializers.java   |  9 ++-------
 .../apache/cxf/jaxrs/swagger/Swagger2Serializers.java   | 12 ------------
 2 files changed, 2 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/36493644/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/DefaultSwagger2Serializers.java
----------------------------------------------------------------------
diff --git a/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/DefaultSwagger2Serializers.java
b/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/DefaultSwagger2Serializers.java
index ded370e..c30d8bc 100644
--- a/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/DefaultSwagger2Serializers.java
+++ b/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/DefaultSwagger2Serializers.java
@@ -105,7 +105,8 @@ public class DefaultSwagger2Serializers extends SwaggerSerializers implements
Sw
                     ClassResourceInfo cri = operations.get(entry.getKey());
 
                     tag = new Tag();
-                    tag.setName(cri.getURITemplate().getValue());
+                    String tagName = StringUtils.removeStart(cri.getURITemplate().getValue(),
"/");
+                    tag.setName(StringUtils.isEmpty(tagName) ? "_" : tagName);
                     if (javadocProvider != null) {
                         tag.setDescription(javadocProvider.getClassDoc(cri));
                     }
@@ -173,32 +174,26 @@ public class DefaultSwagger2Serializers extends SwaggerSerializers implements
Sw
         this.dynamicBasePath = dynamicBasePath;
     }
 
-    @Override
     public void setReplaceTags(final boolean replaceTags) {
         this.replaceTags = replaceTags;
     }
 
-    @Override
     public void setJavadocProvider(final DocumentationProvider javadocProvider) {
         this.javadocProvider = javadocProvider;
     }
 
-    @Override
     public void setClassResourceInfos(final List<ClassResourceInfo> classResourceInfos)
{
         this.cris = classResourceInfos;
     }
 
-    @Override
     public void setJavaDocPath(final String javaDocPath) throws Exception {
         this.javadocProvider = new JavaDocProvider(javaDocPath);
     }
 
-    @Override
     public void setJavaDocPaths(final String... javaDocPaths) throws Exception {
         this.javadocProvider = new JavaDocProvider(javaDocPaths);
     }
 
-    @Override
     public void setJavaDocURLs(final URL[] javaDocURLs) {
         this.javadocProvider = new JavaDocProvider(javaDocURLs);
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/36493644/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Serializers.java
----------------------------------------------------------------------
diff --git a/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Serializers.java
b/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Serializers.java
index ba1dec9..e3272fc 100644
--- a/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Serializers.java
+++ b/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Serializers.java
@@ -18,13 +18,11 @@
  */
 package org.apache.cxf.jaxrs.swagger;
 
-import java.net.URL;
 import java.util.List;
 
 import javax.ws.rs.ext.MessageBodyWriter;
 
 import org.apache.cxf.jaxrs.model.ClassResourceInfo;
-import org.apache.cxf.jaxrs.model.doc.DocumentationProvider;
 
 import io.swagger.jaxrs.config.BeanConfig;
 import io.swagger.models.Swagger;
@@ -35,15 +33,5 @@ public interface Swagger2Serializers extends MessageBodyWriter<Swagger>
{
     
     void setDynamicBasePath(boolean dynamicBasePath);
 
-    void setReplaceTags(boolean replaceTags);
-
-    void setJavadocProvider(DocumentationProvider javadocProvider);
-
     void setClassResourceInfos(List<ClassResourceInfo> classResourceInfos);
-
-    void setJavaDocPath(String javaDocPath) throws Exception;
-
-    void setJavaDocPaths(String... javaDocPaths) throws Exception;
-
-    void setJavaDocURLs(URL[] javaDocURLs);
 }


Mime
View raw message