Skip to content

Custom NotNull annotations stopped working between 2.2.28 and 2.2.29 #4909

Open
@kevinm416

Description

@kevinm416

I'm using springdoc to generate OpenAPI documents for my application. In order to generate improved error messages, I'm using my own @NotNull annotations instead of jakarta.validation.constraints.NotNull. This was working fantastic for me until swagger v2.2.29, when my @NotNull annotations stopped generating the appropriate required fields.

See more details here: springdoc/springdoc-openapi#3004 (comment).

Ideally I would like the previous behavior reinstated where I can use any annotation with the name NotNull to mark required fields.

If that does not happen, are there any extension points I can use to keep my model generation working? I have hundreds of models annotated with @NotNull, and maintaining this is essential for my api clients to work correctly.

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