@ExceptionHandler(ConstraintViolationException.class)
	@ResponseStatus(code = HttpStatus.BAD_REQUEST)
	public ResponseEntity<ErrorMessage> handleConstraintViolatedException(ConstraintViolationException ex
	) {
		Set<ConstraintViolation<?>> constraintViolations = ex.getConstraintViolations();


		List<String> errors = new ArrayList<>(constraintViolations.size());
		String error;
		for (ConstraintViolation constraintViolation : constraintViolations) {

			error = constraintViolation.getMessage();
			errors.add(error);
		}

		ErrorMessage errorMessage = new ErrorMessage(errors);
		return new ResponseEntity(errorMessage, HttpStatus.BAD_REQUEST);
	}
Handle constraint violated exception response entity.

@param ex the ex
@return the response entity
springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/java/test/org/springdoc/api/v31/app110/GlobalControllerAdvice.java