io.vertx.openapi.validation

## Class SchemaValidationException

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

- All Implemented Interfaces:
    Serializable

      public class SchemaValidationException
      extends ValidatorException

  A SchemaValidationException is a special case of a `ValidatorException` and is thrown, if the validation of a request or response fails due to a schema violation. It offers access to the related OutputUnit, which can be used to gain more information about the validation error.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SchemaValidationException(String message, ValidatorErrorType type, OutputUnit outputUnit, Throwable cause)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static SchemaValidationException` | `createInvalidValueParameter(Parameter parameter, OutputUnit outputUnit, JsonSchemaValidationException cause)`
    `static SchemaValidationException` | `createInvalidValueRequestBody(OutputUnit outputUnit, JsonSchemaValidationException cause)`
    `static SchemaValidationException` | `createInvalidValueResponseBody(OutputUnit outputUnit, JsonSchemaValidationException cause)`
    `OutputUnit` | `getOutputUnit()` Returns the related OutputUnit of the validation error.

    - ### Methods inherited from class io.vertx.openapi.validation.ValidatorException

      `createCantDecodeValue, createInvalidValueFormat, createMissingRequiredParameter, createOperationIdInvalid, createOperationNotFound, createResponseNotFound, createUnsupportedValueFormat, 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

    - #### SchemaValidationException

          public SchemaValidationException(String message,
                                           ValidatorErrorType type,
                                           OutputUnit outputUnit,
                                           Throwable cause)

  - ### Method Detail

    - #### createInvalidValueParameter

          public static SchemaValidationException createInvalidValueParameter(Parameter parameter,
                                                                              OutputUnit outputUnit,
                                                                              JsonSchemaValidationException cause)

    - #### createInvalidValueRequestBody

          public static SchemaValidationException createInvalidValueRequestBody(OutputUnit outputUnit,
                                                                                JsonSchemaValidationException cause)

    - #### createInvalidValueResponseBody

          public static SchemaValidationException createInvalidValueResponseBody(OutputUnit outputUnit,
                                                                                 JsonSchemaValidationException cause)

    - #### getOutputUnit

          public OutputUnit getOutputUnit()

      Returns the related OutputUnit of the validation error.
      Returns:
        The related OutputUnit of the validation error.

Copyright © 2024 Eclipse. All rights reserved.