Skip to content

Feature Schema.RequiredMode.AUTO Should Consider Meta-Annotations #4340

@adase11

Description

@adase11

With the changes to @Schema to deprecate the required attribute and replace it with requiredMode in #4286 the auto resolution accounts for annotations directly on the attribute. A nice enhancement would be to also consider any meta-annotations as well. For example:

I have the following custom annotation

@Constraint(validatedBy = {})
@NotNull(message = "must be a valid verification code")
@Pattern(regexp = VERIFICATION_CODE_REGEX, message = "must be a valid verification code")
public @interface ValidVerificationCode {
...
}

It would be nice to have this auto resolved as not null as well by the Schema.RequiredMode.AUTO.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions