[Lumen, PHP, Python, Ruby] Implement exclusiveMinimum/Maximum (#3717)

* Ignore exclusiveMinimum/Maximum in setting hasValidation

* python: Implement exclusiveMinimum/Maximum

* ruby: Implement exclusiveMinimum/Maximum

* lumen: Implement exclusiveMinimum/Maximum

* php: Implement exclusiveMinimum/Maximum
This commit is contained in:
Ville Skyttä
2016-09-06 09:57:35 +03:00
committed by wing328
parent 59891c7f66
commit ddc5b80438
10 changed files with 54 additions and 53 deletions

View File

@@ -1403,7 +1403,8 @@ public class DefaultCodegen {
property.exclusiveMaximum = np.getExclusiveMaximum();
// check if any validation rule defined
if (property.minimum != null || property.maximum != null || property.exclusiveMinimum != null || property.exclusiveMaximum != null)
// exclusive* are noop without corresponding min/max
if (property.minimum != null || property.maximum != null)
property.hasValidation = true;
// legacy support
@@ -2270,8 +2271,8 @@ public class DefaultCodegen {
p.uniqueItems = qp.isUniqueItems();
p.multipleOf = qp.getMultipleOf();
if (p.maximum != null || p.exclusiveMaximum != null ||
p.minimum != null || p.exclusiveMinimum != null ||
// exclusive* are noop without corresponding min/max
if (p.maximum != null || p.minimum != null ||
p.maxLength != null || p.minLength != null ||
p.maxItems != null || p.minItems != null ||
p.pattern != null) {