Skip to content

@Size annotation is ignored on String fields #79

@rbellmf

Description

@rbellmf

A bean field like:
@SiZe(min = 1, max = 36)
@NotNull
private String subject

Will show up in the swagger json as:
"subject" : {
"type" : "string"
}

It should be used to set maxLength and minLength per the @SiZe documentation(http://docs.oracle.com/javaee/7/api/javax/validation/constraints/Size.html):
"subject" : {
"type" : "string",
"minLength" : "1",
"maxLength" : "36"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions