Skip to content

Whether an array is required or not should be controlled by ArraySchema.arraySchema.required instead of ArraySchema.schema.required #3438

@gjgarryuan

Description

@gjgarryuan

if (arraySchema.schema().required()) {
return arraySchema.schema().required();
}

According to the comments of ArraySchema annotation, ArraySchema.schema defines the model of the items within the array, while ArraySchema.arraySchema defines the model for the model of the array itself.

Hence the code should be changed to use:

if (arraySchema.arraySchema().required()) {
    return arraySchema.arraySchema().required();
}

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