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-7316] Activating Swagger2Customizer by default
Date Tue, 01 Aug 2017 15:54:14 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 5fa39c845 -> 6a1bc2963


[CXF-7316] Activating Swagger2Customizer by default


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

Branch: refs/heads/master
Commit: 6a1bc29634a5328fb3d5f5927cdebbde9af63715
Parents: 5fa39c8
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Tue Aug 1 16:53:54 2017 +0100
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Tue Aug 1 16:53:54 2017 +0100

----------------------------------------------------------------------
 .../java/org/apache/cxf/jaxrs/swagger/Swagger2Feature.java   | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/6a1bc296/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Feature.java
----------------------------------------------------------------------
diff --git a/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Feature.java
b/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Feature.java
index 8dceb29..562e5db 100644
--- a/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Feature.java
+++ b/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Feature.java
@@ -164,14 +164,14 @@ public class Swagger2Feature extends AbstractSwaggerFeature {
                 }
             }
         }
-        if (customizer == null) {
-            if (swagger2Serializers == null) {
-                swagger2Serializers = new DefaultSwagger2Serializers();
-            }
+        if (swagger2Serializers != null) {
             swagger2Serializers.setClassResourceInfos(cris);
             swagger2Serializers.setDynamicBasePath(dynamicBasePath);
             providers.add(swagger2Serializers);
         } else {
+            if (customizer == null) {
+                customizer = new Swagger2Customizer();
+            }
             customizer.setClassResourceInfos(cris);
             customizer.setDynamicBasePath(dynamicBasePath);
         }


Mime
View raw message