Package io.vertx.mutiny.json.schema
Class Validator
java.lang.Object
io.vertx.mutiny.json.schema.Validator
- All Implemented Interfaces:
MutinyDelegate
A validator, validates some input object using a well known schema.
NOTE: This class has been automatically generated from the original non Mutiny-ified interface.
- Author:
- Paulo Lopes
- See Also:
-
Validator
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Validatorcreate(JsonSchema schema, io.vertx.json.schema.JsonSchemaOptions options) Creates a new validator with some initial schema and options.static Validatorcreate(JsonSchema schema, io.vertx.json.schema.JsonSchemaOptions options, JsonFormatValidator jsonFormatValidator) Creates a new validator with some initial schema, options and a custom JSON format validator.booleanio.vertx.json.schema.ValidatorGet the delegate instance.inthashCode()static ValidatornewInstance(io.vertx.json.schema.Validator delegate) Creates a new instance of theValidator.toString()io.vertx.json.schema.OutputUnitValidate a given input against the initial schema.
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
Validator
public Validator(io.vertx.json.schema.Validator delegate) Create a new instance ofValidatordelegating to the given (non-null) instance ofValidator. -
Validator
-
-
Method Details
-
getDelegate
public io.vertx.json.schema.Validator getDelegate()Get the delegate instance.This method returns the instance on which this shim is delegating the calls. And so, give you access to the bare API.
- Specified by:
getDelegatein interfaceMutinyDelegate- Returns:
- the delegate instance
-
create
Creates a new validator with some initial schema and options.When validation is to be reused, it is recommended to create a
SchemaRepositoryinstance and use theSchemaRepository.validator(String)} method. The use of aStringkey allows avoiding re-parsing and fast lookups.- Parameters:
schema- the initial schemaoptions- the validator options- Returns:
- a validator instance
-
create
public static Validator create(JsonSchema schema, io.vertx.json.schema.JsonSchemaOptions options, JsonFormatValidator jsonFormatValidator) Creates a new validator with some initial schema, options and a custom JSON format validator. When validation is to be reused, it is recommended to create aSchemaRepositoryinstance and use theSchemaRepository.validator(String)} method. The use of aStringkey allows avoiding re-parsing and fast lookups.- Parameters:
schema- the initial schemaoptions- the validator optionsjsonFormatValidator- the custom JSON format validator- Returns:
- a validator instance
-
validate
public io.vertx.json.schema.OutputUnit validate(Object instance) throws io.vertx.json.schema.SchemaException Validate a given input against the initial schema.- Parameters:
instance- instance to validate- Returns:
- returns a output unit object as defined by the options
- Throws:
io.vertx.json.schema.SchemaException
-
newInstance
Creates a new instance of theValidator. -
hashCode
public int hashCode() -
equals
-
toString
-