-
-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Open
Labels
Description
Given a openapi.yml with any object with field constraints like this:
lastNames:
type: "string"
description: "Affiliate last names"
maxLength: 10
birthdate:
type: "string"
format: "date"
example: '2020-02-02'
names:
type: "string"
maxLength: 5
When we apply the plugin to generate code with java + spring-reactive we can obtain an object like this:
@ApiModelProperty(required = true, value = "")
@NotNull
@Size(max=5)
public String getNames() {
return names;
}
@ApiModelProperty(required = true, value = "Affiliate last names")
@NotNull
@Size(max=10)
public String getLastNames() {
return lastNames;
}
With javax. bean validation we can customize the message with a placeholder or hard-coded text.
@Size(max=10,message="{my-error}")
Is there any way to customize javax annotation messages with place holders or text?
Regards
ibilyi, gabmule, janekolszak, marcussmeekesDHL, kareem-abdul and 1 more