Skip to content

Add @Valid on all collections, not just those with items type "object" #158

@akushe

Description

@akushe

I have a list of objects which internally hold types of either A,B or C .It has been declared in the following fashion

        "types" : {
            "type": "array",
            "minitems":0,
            "items": {
                "anyOf": [
                    { "$ref": "A.json" },
                    { "$ref": "B.json" },
                    { "$ref": "C.json" }
                ]
            },
        "required" : false
        }

This generates a Pojo without the @Valid object

     @JsonProperty("experiences")
    private List<Object> types = new ArrayList<Object>();

Question is would it be possible to add @Valid annotation on the list ?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions