Package 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 intoSchemaValidationException.- See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Modifier Constructor Description ValidatorException(String message, ValidatorErrorType type)protectedValidatorException(String message, ValidatorErrorType type, Throwable cause)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ValidatorExceptioncreateCantDecodeValue(Parameter parameter)static ValidatorExceptioncreateInvalidValueFormat(Parameter parameter)static ValidatorExceptioncreateMissingRequiredParameter(Parameter parameter)static ValidatorExceptioncreateOperationIdInvalid(String operationId)static ValidatorExceptioncreateOperationNotFound(HttpMethod method, String path)static ValidatorExceptioncreateResponseNotFound(int statusCode, String operation)static ValidatorExceptioncreateUnsupportedValueFormat(Parameter parameter)ValidatorErrorTypetype()- 
Methods inherited from class java.lang.ThrowableaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
- 
 
- 
- 
- 
Constructor Detail- 
ValidatorExceptionpublic ValidatorException(String message, ValidatorErrorType type) 
 - 
ValidatorExceptionprotected ValidatorException(String message, ValidatorErrorType type, Throwable cause) 
 
- 
 - 
Method Detail- 
createMissingRequiredParameterpublic static ValidatorException createMissingRequiredParameter(Parameter parameter) 
 - 
createInvalidValueFormatpublic static ValidatorException createInvalidValueFormat(Parameter parameter) 
 - 
createUnsupportedValueFormatpublic static ValidatorException createUnsupportedValueFormat(Parameter parameter) 
 - 
createCantDecodeValuepublic static ValidatorException createCantDecodeValue(Parameter parameter) 
 - 
createOperationIdInvalidpublic static ValidatorException createOperationIdInvalid(String operationId) 
 - 
createOperationNotFoundpublic static ValidatorException createOperationNotFound(HttpMethod method, String path) 
 - 
createResponseNotFoundpublic static ValidatorException createResponseNotFound(int statusCode, String operation) 
 - 
typepublic ValidatorErrorType type() 
 
- 
 
-