@@ -1503,16 +1503,8 @@ public static void syncValidationProperties(Schema schema, CodegenSchema target)
15031503 BigDecimal multipleOf = schema .getMultipleOf ();
15041504 BigDecimal minimum = schema .getMinimum ();
15051505 BigDecimal maximum = schema .getMaximum ();
1506- Boolean exclusiveMinimum = schema .getExclusiveMinimum ();
1507- if (minimum == null && schema .getExclusiveMinimumValue () != null ) {
1508- minimum = schema .getExclusiveMinimumValue ();
1509- exclusiveMinimum = Boolean .TRUE ;
1510- }
1511- Boolean exclusiveMaximum = schema .getExclusiveMaximum ();
1512- if (maximum == null && schema .getExclusiveMaximumValue () != null ) {
1513- maximum = schema .getExclusiveMaximumValue ();
1514- exclusiveMaximum = Boolean .TRUE ;
1515- }
1506+ BigDecimal exclusiveMinimum = schema .getExclusiveMinimumValue ();
1507+ BigDecimal exclusiveMaximum = schema .getExclusiveMaximumValue ();
15161508
15171509 if (isArraySchema (schema )) {
15181510 setArrayValidations (minItems , maxItems , uniqueItems , target );
@@ -1551,24 +1543,12 @@ private static void setStringValidations(Integer minLength, Integer maxLength, S
15511543 if (maxLength != null ) target .maxLength = maxLength ;
15521544 }
15531545
1554- private static void setNumericValidations (Schema schema , BigDecimal multipleOf , BigDecimal minimum , BigDecimal maximum , Boolean exclusiveMinimum , Boolean exclusiveMaximum , CodegenSchema target ) {
1555- if (multipleOf != null ) target .multipleOf = multipleOf ;
1556- if (minimum != null ) {
1557- if (isIntegerSchema (schema )) {
1558- target .minimum = String .valueOf (minimum .longValue ());
1559- } else {
1560- target .minimum = String .valueOf (minimum );
1561- }
1562- if (exclusiveMinimum != null ) target .exclusiveMinimum = exclusiveMinimum ;
1563- }
1564- if (maximum != null ) {
1565- if (isIntegerSchema (schema )) {
1566- target .maximum = String .valueOf (maximum .longValue ());
1567- } else {
1568- target .maximum = String .valueOf (maximum );
1569- }
1570- if (exclusiveMaximum != null ) target .exclusiveMaximum = exclusiveMaximum ;
1571- }
1546+ private static void setNumericValidations (Schema schema , BigDecimal multipleOf , BigDecimal minimum , BigDecimal maximum , BigDecimal exclusiveMinimum , BigDecimal exclusiveMaximum , CodegenSchema target ) {
1547+ target .multipleOf = multipleOf ;
1548+ target .minimum = minimum ;
1549+ target .maximum = maximum ;
1550+ target .exclusiveMinimum = exclusiveMinimum ;
1551+ target .exclusiveMaximum = exclusiveMaximum ;
15721552 }
15731553
15741554 private static ObjectMapper getRightMapper (String data ) {
0 commit comments