@@ -1503,16 +1503,8 @@ public static void syncValidationProperties(Schema schema, CodegenSchema target)
1503
1503
BigDecimal multipleOf = schema .getMultipleOf ();
1504
1504
BigDecimal minimum = schema .getMinimum ();
1505
1505
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 ();
1516
1508
1517
1509
if (isArraySchema (schema )) {
1518
1510
setArrayValidations (minItems , maxItems , uniqueItems , target );
@@ -1551,24 +1543,12 @@ private static void setStringValidations(Integer minLength, Integer maxLength, S
1551
1543
if (maxLength != null ) target .maxLength = maxLength ;
1552
1544
}
1553
1545
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 ;
1572
1552
}
1573
1553
1574
1554
private static ObjectMapper getRightMapper (String data ) {
0 commit comments