Netflix / Netflix/dgs-codegen

HV000271: Using @Valid on a container (java.util.List) is deprecated. You should apply the annotation on the type argument(s).

Open
#954 0 comments 0 reactions 1 assignee View on GitHub

@jiholee17 is already working on this.

Since Sep 14, 2026.

enhancement
Dominant language
Kotlin
Stars
217
Forks
116
PR merge metrics
No merged PRs in 30d

Description

When upgrading to spring boot 4.1, I encountered the warning that @Valid is deprecated on containers (https://docs.hibernate.org/validator/9.1/whats-new/en-US/html_single/#_jakarta_ee_11). I currently use annotations in my graphql schema as follows:

input WorkplaceInput
{
    employees: [EmployeeInput!]
    @annotate(name: "jakarta.validation.Valid")
}

input EmployeeInput
{
    name: String!
    @annotate(name: "jakarta.validation.constraints.Pattern", inputs: {regexp: "^[a-zA-Z]{2,64}$"})
}

Is there a way to achieve the same validation on employees without applying @Valid to the list of employees? Thanks!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.