我的端点上有以下注解:
@RequestBody(content = @Content(schema = @Schema(implementation = ReactivateRequest.class, type = SchemaType.OBJECT)))
如果 ReactivateRequest
注解
public class ReactivateRequest {
@Size(max = 255)
@ValidEmail
@NotBlank(message = "Email required")
private String email;
}
违反,例如,与不正确的电子邮件,我得到以下回应
{
"fields": {
"email": [
{
"object": "ReactivateRequest",
"typeOfViolation": "ValidEmail",
"message": "Invalid email"
}
]
}
}
具体在哪里?如何制作自己的回复格式?
暂无答案!
目前还没有任何答案,快来回答吧!