cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject [1/2] cxf git commit: Upgrading to Swagger JAX-RS 1.5.11
Date Tue, 27 Dec 2016 11:13:26 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 2ac0b9a91 -> 47d32e633
  refs/heads/master c194254d6 -> 939a75d9d


Upgrading to Swagger JAX-RS 1.5.11


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

Branch: refs/heads/3.1.x-fixes
Commit: 47d32e6333429a4809f5dedc7d39b4d884b21f28
Parents: 2ac0b9a
Author: Francesco Chicchiriccò <ilgrosso@apache.org>
Authored: Tue Dec 27 12:12:58 2016 +0100
Committer: Francesco Chicchiriccò <ilgrosso@apache.org>
Committed: Tue Dec 27 12:12:58 2016 +0100

----------------------------------------------------------------------
 parent/pom.xml                                         |  2 +-
 .../org/apache/cxf/jaxrs/swagger/JaxRs2Extension.java  | 13 +++++++------
 2 files changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/47d32e63/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index c26f12c..980ec15 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -151,7 +151,7 @@
         <cxf.spring.ldap.version>2.2.0.RELEASE</cxf.spring.ldap.version>
         <cxf.spring.mock>spring-test</cxf.spring.mock>
         <cxf.swagger.version>1.3.13</cxf.swagger.version>
-        <cxf.swagger2.version>1.5.10</cxf.swagger2.version>
+        <cxf.swagger2.version>1.5.11</cxf.swagger2.version>
         <cxf.velocity.version>1.7</cxf.velocity.version>
         <cxf.woodstox.core.version>4.4.1</cxf.woodstox.core.version>
         <cxf.woodstox.stax2-api.version>3.1.4</cxf.woodstox.stax2-api.version>

http://git-wip-us.apache.org/repos/asf/cxf/blob/47d32e63/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/JaxRs2Extension.java
----------------------------------------------------------------------
diff --git a/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/JaxRs2Extension.java
b/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/JaxRs2Extension.java
index 87e0cf2..57437c5 100644
--- a/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/JaxRs2Extension.java
+++ b/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/JaxRs2Extension.java
@@ -20,6 +20,7 @@ package org.apache.cxf.jaxrs.swagger;
 
 import java.lang.annotation.Annotation;
 import java.lang.reflect.Type;
+import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -184,17 +185,17 @@ public class JaxRs2Extension extends AbstractSwaggerExtension {
 
             if (annos.containsKey(Min.class.getName())) {
                 Min min = (Min) annos.get(Min.class.getName());
-                serializable.setMinimum(new Double(min.value()));
+                serializable.setMinimum(BigDecimal.valueOf(min.value()));
             }
             if (annos.containsKey(Max.class.getName())) {
                 Max max = (Max) annos.get(Max.class.getName());
-                serializable.setMaximum(new Double(max.value()));
+                serializable.setMaximum(BigDecimal.valueOf(max.value()));
             }
             if (annos.containsKey(Size.class.getName())) {
                 Size size = (Size) annos.get(Size.class.getName());
 
-                serializable.setMinimum(new Double(size.min()));
-                serializable.setMaximum(new Double(size.max()));
+                serializable.setMinimum(BigDecimal.valueOf(size.min()));
+                serializable.setMaximum(BigDecimal.valueOf(size.max()));
 
                 serializable.setMinItems(size.min());
                 serializable.setMaxItems(size.max());
@@ -202,7 +203,7 @@ public class JaxRs2Extension extends AbstractSwaggerExtension {
             if (annos.containsKey(DecimalMin.class.getName())) {
                 DecimalMin min = (DecimalMin) annos.get(DecimalMin.class.getName());
                 if (min.inclusive()) {
-                    serializable.setMinimum(new Double(min.value()));
+                    serializable.setMinimum(BigDecimal.valueOf(new Double(min.value())));
                 } else {
                     serializable.setExclusiveMinimum(!min.inclusive());
                 }
@@ -210,7 +211,7 @@ public class JaxRs2Extension extends AbstractSwaggerExtension {
             if (annos.containsKey(DecimalMax.class.getName())) {
                 DecimalMax max = (DecimalMax) annos.get(DecimalMax.class.getName());
                 if (max.inclusive()) {
-                    serializable.setMaximum(new Double(max.value()));
+                    serializable.setMaximum(BigDecimal.valueOf(new Double(max.value())));
                 } else {
                     serializable.setExclusiveMaximum(!max.inclusive());
                 }


Mime
View raw message