Skip to content

[enhancement] Confusing to have jakarta/javax @Valid, avaje-http @Valid, avaje-validator @Valid #666

@mechite

Description

@mechite

They do different things, but I can consider this to potentially confuse people.

I feel like maybe the one in validator should change?
I also feel something else.


Could we possibly make an @Valid.Records for the module-info whereby all
record classes automagically get a ValidationAdapter, even if it is never used?

Really, there are a lot of ways I am thinking about how to make this less obtuse.


What's the point of the validator, if no validation constraints are used in a given @Valid record?

Maybe instead, any given class with any @Constraint-annotated annotations declared,
could somehow have adapters generated?

I don't know how it would work from the processor context.
Maybe there you would just apply a module-wide @Valid or a new, clearer @ValidatorModule
annotation that can walk the module-info exports just as avaje/avaje-record-builder#88

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