Skip to content

Support decimal min and max #326

@Tenischev

Description

@Tenischev

Describe the bug

I defined a field as type number and format double with minimum as 0.01. The asyncapi cli generator generated with java springboot template defined the field correctly as Double but the jakarta validation @min accepts only long. It seems like only @DecimalMin can support decimal types but it requires a string type.

Similar discussion - https://stackoverflow.com/questions/7422803/why-do-bean-validation-min-max-constraints-not-support-the-double-type

Bug reported by Sajeesh Kumar in Slack

Expected behavior

DecimalMin \ DecimalMax is used for Double validation

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/javaSpecify what technical area given issue relates to. Its goal is to ease filtering good first issues.bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions