cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject cxf git commit: [CXF-6586] Missing some bean properties in Swagger2Feature
Date Wed, 09 Sep 2015 11:51:33 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 9c6a35df3 -> e695fde31


[CXF-6586] Missing some bean properties in Swagger2Feature


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

Branch: refs/heads/master
Commit: e695fde31a1b1ac583570edb7ebec352434c96ab
Parents: 9c6a35d
Author: Akitoshi Yoshida <ay@apache.org>
Authored: Wed Sep 9 13:50:50 2015 +0200
Committer: Akitoshi Yoshida <ay@apache.org>
Committed: Wed Sep 9 13:51:19 2015 +0200

----------------------------------------------------------------------
 .../jaxrs/swagger/AbstractSwaggerFeature.java   | 14 ++++++++++++
 .../cxf/jaxrs/swagger/Swagger2Feature.java      | 23 ++++++++++++++++++++
 .../cxf/jaxrs/swagger/SwaggerFeature.java       |  2 ++
 3 files changed, 39 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/e695fde3/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/AbstractSwaggerFeature.java
----------------------------------------------------------------------
diff --git a/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/AbstractSwaggerFeature.java
b/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/AbstractSwaggerFeature.java
index ee53b44..a0aef8f 100644
--- a/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/AbstractSwaggerFeature.java
+++ b/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/AbstractSwaggerFeature.java
@@ -36,6 +36,8 @@ public abstract class AbstractSwaggerFeature extends AbstractFeature {
     private String contact = "users@cxf.apache.org";
     private String license = "Apache 2.0 License";
     private String licenseUrl = "http://www.apache.org/licenses/LICENSE-2.0.html";
+    private String termOfServiceUrl;
+    private String filterClass;
     
     @Override
     public void initialize(Server server, Bus bus) {
@@ -116,12 +118,24 @@ public abstract class AbstractSwaggerFeature extends AbstractFeature
{
     public void setLicenseUrl(String licenseUrl) {
         this.licenseUrl = licenseUrl;
     }
+    public String getTermOfServiceUrl() {
+        return termOfServiceUrl;
+    }
+    public void setTermOfServiceUrl(String termOfServiceUrl) {
+        this.termOfServiceUrl = termOfServiceUrl;
+    }
     public boolean isScan() {
         return scan;
     }
     public void setScan(boolean scan) {
         this.scan = scan;
     }
+    public String getFilterClass() {
+        return filterClass;
+    }
+    public void setFilterClass(String filterClass) {
+        this.filterClass = filterClass;
+    }
 
     public boolean isRunAsFilter() {
         return runAsFilter;

http://git-wip-us.apache.org/repos/asf/cxf/blob/e695fde3/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Feature.java
----------------------------------------------------------------------
diff --git a/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Feature.java
b/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Feature.java
index 42f3950..8955418 100644
--- a/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Feature.java
+++ b/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Feature.java
@@ -48,6 +48,9 @@ import io.swagger.jaxrs.listing.SwaggerSerializers;
 
 public class Swagger2Feature extends AbstractSwaggerFeature {
     private String host;
+    private String[] schemes;
+    private boolean prettyPrint;
+
     private boolean scanAllResources;
     private String ignoreRoutes;
 
@@ -80,12 +83,16 @@ public class Swagger2Feature extends AbstractSwaggerFeature {
         beanConfig.setVersion(getVersion());
         beanConfig.setBasePath(getBasePath());
         beanConfig.setHost(getHost());
+        beanConfig.setSchemes(getSchemes());
         beanConfig.setTitle(getTitle());
         beanConfig.setDescription(getDescription());
         beanConfig.setContact(getContact());
         beanConfig.setLicense(getLicense());
         beanConfig.setLicenseUrl(getLicenseUrl());
+        beanConfig.setTermsOfServiceUrl(getTermOfServiceUrl());
         beanConfig.setScan(isScan());
+        beanConfig.setPrettyPrint(isPrettyPrint());
+        beanConfig.setFilterClass(getFilterClass());
     }
 
     public String getHost() {
@@ -95,6 +102,22 @@ public class Swagger2Feature extends AbstractSwaggerFeature {
         this.host = host;
     }
 
+    public String[] getSchemes() {
+        return schemes;
+    }
+
+    public void setSchemes(String[] schemes) {
+        this.schemes = schemes;
+    }
+
+    public boolean isPrettyPrint() {
+        return prettyPrint;
+    }
+
+    public void setPrettyPrint(boolean prettyPrint) {
+        this.prettyPrint = prettyPrint;
+    }
+
     public boolean isScanAllResources() {
         return scanAllResources;
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/e695fde3/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/SwaggerFeature.java
----------------------------------------------------------------------
diff --git a/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/SwaggerFeature.java
b/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/SwaggerFeature.java
index e008686..e0ed632 100644
--- a/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/SwaggerFeature.java
+++ b/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/swagger/SwaggerFeature.java
@@ -70,7 +70,9 @@ public class SwaggerFeature extends AbstractSwaggerFeature {
         beanConfig.setContact(getContact());
         beanConfig.setLicense(getLicense());
         beanConfig.setLicenseUrl(getLicenseUrl());
+        beanConfig.setTermsOfServiceUrl(getTermOfServiceUrl());
         beanConfig.setScan(isScan());
+        beanConfig.setFilterClass(getFilterClass());
     }    
 
     @Override


Mime
View raw message