io.vertx.openapi.validation

## Class ValidatorException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.lang.RuntimeException
      - - io.vertx.openapi.validation.ValidatorException

- All Implemented Interfaces:
    Serializable
  Direct Known Subclasses:
    SchemaValidationException

      public class ValidatorException
      extends RuntimeException

  A ValidatorException is thrown, if the validation of a request or response fails. The validation can fail for formal reasons, such as the wrong format for a parameter or the absence of a required parameter. However, validation can of course also fail because the content does not match the defined schema. In this case have a look into `SchemaValidationException`.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `` | `ValidatorException(String message, ValidatorErrorType type)`
    `protected` | `ValidatorException(String message, ValidatorErrorType type, Throwable cause)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static ValidatorException` | `createCantDecodeValue(Parameter parameter)`
    `static ValidatorException` | `createInvalidValueFormat(Parameter parameter)`
    `static ValidatorException` | `createMissingRequiredParameter(Parameter parameter)`
    `static ValidatorException` | `createOperationIdInvalid(String operationId)`
    `static ValidatorException` | `createOperationNotFound(HttpMethod method, String path)`
    `static ValidatorException` | `createResponseNotFound(int statusCode, String operation)`
    `static ValidatorException` | `createUnsupportedValueFormat(Parameter parameter)`
    `ValidatorErrorType` | `type()`

    - ### Methods inherited from class java.lang.Throwable

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### ValidatorException

          public ValidatorException(String message,
                                    ValidatorErrorType type)

    - #### ValidatorException

          protected ValidatorException(String message,
                                       ValidatorErrorType type,
                                       Throwable cause)

  - ### Method Detail

    - #### createMissingRequiredParameter

          public static ValidatorException createMissingRequiredParameter(Parameter parameter)

    - #### createInvalidValueFormat

          public static ValidatorException createInvalidValueFormat(Parameter parameter)

    - #### createUnsupportedValueFormat

          public static ValidatorException createUnsupportedValueFormat(Parameter parameter)

    - #### createCantDecodeValue

          public static ValidatorException createCantDecodeValue(Parameter parameter)

    - #### createOperationIdInvalid

          public static ValidatorException createOperationIdInvalid(String operationId)

    - #### createOperationNotFound

          public static ValidatorException createOperationNotFound(HttpMethod method,
                                                                   String path)

    - #### createResponseNotFound

          public static ValidatorException createResponseNotFound(int statusCode,
                                                                  String operation)

    - #### type

          public ValidatorErrorType type()

Copyright © 2025 Eclipse. All rights reserved.