Interface MethodArgumentNotValidAdviceTrait

    • Method Detail

      • handleMethodArgumentNotValid

        @API(status=INTERNAL)
        @ExceptionHandler
        default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> handleMethodArgumentNotValid​(org.springframework.web.bind.MethodArgumentNotValidException exception,
                                                                                                                  org.springframework.web.context.request.NativeWebRequest request)
      • defaultConstraintViolationType

        default URI defaultConstraintViolationType()
      • defaultConstraintViolationStatus

        default org.zalando.problem.StatusType defaultConstraintViolationStatus()
      • formatFieldName

        default String formatFieldName​(String fieldName)
        Format the name of a violating field (e.g. lower camel to snake case)
        Parameters:
        fieldName - the field name to format
        Returns:
        the formatted field name, defaults to the parameter, i.e. doesn't apply any transformation
      • newConstraintViolationProblem

        default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> newConstraintViolationProblem​(Throwable throwable,
                                                                                                                   Collection<Violation> stream,
                                                                                                                   org.springframework.web.context.request.NativeWebRequest request)