custom validation message in bean validation annotations
Description [JAVA] When i try to generate the objects using the below , generate objects does not have message value . expected: @JsonProperty("inlineString") @Nullable @Size(max=100, message='validation message') public String getinlineString();
instead getting
@JsonProperty("inlineString") @Nullable @Size(max=100) public String getinlineString();
Test.yaml File efinitions: stringPattern: type: string minLength: 1 maxLength: 20 pattern: '^([a-zA-Z0-9])*$' decimalNumber: type: number minimum: 0 maximum: 9999999999999.99 multipleOf: 0.01 ApiRequest: type: object properties: stringPattern: $ref: '#/definitions/stringPattern' decimalNumber: $ref: '#/definitions/decimalNumber' inlineString: type: string minLength: 1 maxLength: 20 message :" max number should 20"
Swagger-codegen version
using swagger codegen version 2.4.5
Can you please suggest a way to pull the custom validation message in the yaml file and which in turn generates a object with the same messages.
did you find any solution to this?