Is there way to provide custom error message for validation fail in openAPI?

110 Views Asked by At

I have following field definition:

MyField:
  description: blablabla
  type: integer
  default: 1
  minimum: 1
  exclusiveMinimum: false

In case if I provide -1 value I receive standard error like

 Validation failed for argument [1] in public org.springframework.http.ResponseEntity<java.util.List...]; default message [must be greater than or equal to 1]] 

Is there way to customize this error message ?

0

There are 0 best solutions below