Skip to content

@Valid annotations added on same getter in both parent and child objects lead to exception #265

@stojsavljevic

Description

@stojsavljevic

In case we have something like this:

types: 
  Addres: 
    type: object
    properties: 
      city: string
      street: string
      houseNo: string
  Parent: 
    type: object
    properties: 
      address: Addres
  Child: 
    type: Parent

the plugin will generate getAddres method in both Parent and Child with @Valid annotation (if validation is used). But when validating Child object exception is thrown:

javax.validation.ConstraintDeclarationException: HV000131: 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: ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugv2Feature will be implemented in v2.0 only (master branch)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions