diff --git a/template/src/main/java/com/asyncapi/model/$$objectSchema$$.java b/template/src/main/java/com/asyncapi/model/$$objectSchema$$.java index de7ccc3b4..438b4edc4 100644 --- a/template/src/main/java/com/asyncapi/model/$$objectSchema$$.java +++ b/template/src/main/java/com/asyncapi/model/$$objectSchema$$.java @@ -146,8 +146,8 @@ public class {{allName}} { {%- if propName | isRequired(schema.required()) %}@NotNull{% endif %} {%- if prop.minLength() or prop.maxLength() or prop.maxItems() or prop.minItems() %}@Size({% if prop.minLength() or prop.minItems() %}min = {{prop.minLength()}}{{prop.minItems()}}{% endif %}{% if prop.maxLength() or prop.maxItems() %}{% if prop.minLength() or prop.minItems() %},{% endif %}max = {{prop.maxLength()}}{{prop.maxItems()}}{% endif %}){% endif %} {%- if prop.pattern() %}@Pattern(regexp="{{prop.pattern() | addBackSlashToPattern}}"){% endif %} - {%- if prop.minimum() %}@Min({{prop.minimum()}}){% endif %}{% if prop.exclusiveMinimum() %}@Min({{prop.exclusiveMinimum() + 1}}){% endif %} - {%- if prop.maximum() %}@Max({{prop.maximum()}}){% endif %}{% if prop.exclusiveMaximum() %}@Max({{prop.exclusiveMaximum() + 1}}){% endif %} + {%- if prop.minimum() %}@Min({{prop.minimum()}}){% endif %}{% if prop.exclusiveMinimum() %}@DecimalMin({{prop.exclusiveMinimum() + 1}}){% endif %} + {%- if prop.maximum() %}@Max({{prop.maximum()}}){% endif %}{% if prop.exclusiveMaximum() %}@DecimalMax({{prop.exclusiveMaximum() + 1}}){% endif %} public {{propType}} get{{className}}() { return {{varName}}; }