ArraySchema annotation on model accessors doesn't map to API spec properly
Help me, what am I doing wrong?
@ArraySchema(maxItems = 500, arraySchema = @Schema(description = "error", type = "string", maxLength = 2048)) private List errors;
Result: "errors": { "maxLength": 2048, "maxItems": 500, "type": "array", "description": "Error", "items": { "type": "string" } } expected: "errors": { "maxItems": 500, "type": "array", "description": "Error", "items": { "type": "string", "maxLength": 2048 } }
It helped me to: @ArraySchema(maxItems = 500, arraySchema = @Schema(description = "Errors"), schema = @Schema(type = "string", maxLength = 2048)) Result: "errors": { "maxItems": 500, "type": "array", "description": "Errors", "items": { "maxLength": 2048, "type": "string" } }