xxxxxxxxxx
/**
* This class holds a list of {@code ErrorModel} that describe the error raised on rejected validation
* @author ROUSSI Abdelghani
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ErrorResponse {
private List<ErrorModel> errorMessage;
}
/**
* This class describe the error object model, which is a simple POJO that contains the rejected filedName, rejectedValue
* and a messageError.
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ErrorModel{
private String fieldName;
private Object rejectedValue;
private String messageError;
}