record-builder icon indicating copy to clipboard operation
record-builder copied to clipboard

JSR303 @Valid is not getting filtered out

Open elyse-yao opened this issue 1 year ago • 1 comments

I have the record: public record Foo(String id, @Valid @NotNull Bar properties) implements FooBuilder.With {}

And I'm getting this error: A method return value must not be marked for cascaded validation more than once in a class hierarchy, but the following two methods are marked as such: With#properties(), Foo#properties()

I saw in the record-builder processor source that it's meant to be filtered out, but that only applies to the javax version of the annotation, not the jakarta.validation.Valid used in spring. I know I can just disable all annotation inheritance, but Is there a way to configure record-builder to filter out specific annotations instead?

elyse-yao avatar Oct 23 '24 23:10 elyse-yao

Right - the jakarta rename mess. We should update for that and filter both. I'd appreciate a PR with this change.

Randgalt avatar Oct 24 '24 09:10 Randgalt

(^ @Randgalt small bump for the PR, sorry for the delay!)

elyse-yao avatar Nov 21 '24 01:11 elyse-yao