vertx / io.vertx.ext.web.api.validation

Package io.vertx.ext.web.api.validation

Types

ContainerDeserializer

interface ContainerDeserializer

Interface that define methods for deserialization of array and objects

ContainerSerializationStyle

class ContainerSerializationStyle

This enum contains supported object and arrays serialization styles. Every style has a enum value, and an array of strings to refeer to it.

CustomValidator

interface CustomValidator

This interface is used to add custom synchronous functions inside validation process. You can add it in HTTPRequestValidationHandler.

HTTPRequestValidationHandler

interface HTTPRequestValidationHandler : ValidationHandler

An interface for add HTTP Request validation. This class can validate parameters inside query, path, headers an body (watch below) You can assign multiple body type at the same time(for example a JSON schema together with a XML schema). This interface support:

  • application/x-www-form-urlencoded
  • multipart/form-data
  • application/xml
  • application/json
Also you can add a form parameter for validation without care about content type of your request. For form parameters this interface support both "multipart/form-data" and "application/x-www-form-urlencoded" This interface allow extra parameters in the request, so it doesn't care if in a request there's a parameter without a specified validation rule If a parameter is flagged as an array, it will be validated also if the size of array is 1 element

ParameterLocation

class ParameterLocation

ParameterLocation describe the location of parameter inside HTTP Request

ParameterType

class ParameterType

ParameterType contains prebuilt type validators. To access to ParameterTypeValidator of every ParameterType, use ParameterType#validationMethod()

ParameterTypeValidator

interface ParameterTypeValidator

Interface for declaration of method for validate a specific parameter type. If you want to implement your own type validator, you need only to implement ParameterTypeValidator#isValid(String):

ParameterValidationRule

interface ParameterValidationRule

This function is an inner wrapper for ParameterTypeValidator inside ValidationHandler parameter maps. Don't instantiate this class, if you want to add custom ParameterTypeValidator to a parameter use functions in HTTPRequestValidationHandler

ValidationHandler

interface ValidationHandler : Handler<RoutingContext>

Base interface for validation. For basic HTTP Request Validator, use HTTPRequestValidationHandler

Exceptions

SpecFeatureNotSupportedException

open class SpecFeatureNotSupportedException : RuntimeException

ValidationException

open class ValidationException : VertxException

This is the main class for every Validation flow related errors