cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject [04/37] cxf git commit: [CXF-7022] Minimising a number of interface methods, adding a tad fix (with thanks to Francesco)
Date Sat, 10 Sep 2016 14:41:12 GMT
[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/ea1abeeb
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/ea1abeeb
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/ea1abeeb

Branch: refs/heads/master-jaxrs-2.1
Commit: ea1abeeb2c967a7ed610929d9f7bb09792702fca
Parents: 5d73e20
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:10:29 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/ea1abeeb/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/DefaultSwagger2Serializers.java
----------------------------------------------------------------------
diff --git a/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/DefaultSwagger2Serializers.java
b/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/DefaultSwagger2Serializers.java
index 2a32e7c..f5068c7 100644
--- a/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/DefaultSwagger2Serializers.java
+++ b/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/DefaultSwagger2Serializers.java
@@ -104,7 +104,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));
                     }
@@ -172,32 +173,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/ea1abeeb/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Serializers.java
----------------------------------------------------------------------
diff --git a/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Serializers.java
b/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Serializers.java
index ba1dec9..e3272fc 100644
--- a/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Serializers.java
+++ b/rt/rs/description-swagger/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