Package io.vertx.rxjava3.json.schema
Class Validator
- java.lang.Object
-
- io.vertx.rxjava3.json.schema.Validator
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<Validator>__TYPE_ARG
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Validatorcreate(JsonSchema schema, JsonSchemaOptions options)Creates a new validator with some initial schema and options.booleanequals(Object o)ValidatorgetDelegate()inthashCode()static ValidatornewInstance(Validator arg)StringtoString()OutputUnitvalidate(Object instance)Validate a given input against the initial schema
-
-
-
Method Detail
-
getDelegate
public Validator getDelegate()
-
create
public static Validator create(JsonSchema schema, JsonSchemaOptions options)
Creates a new validator with some initial schema and options. When validation is to be reused, it is recommended to create aSchemaRepositoryinstance and use theSchemaRepository.validator(io.vertx.rxjava3.json.schema.JsonSchema)} method. The use of aStringkey allows avoiding re-parsing and fast lookups.- Parameters:
schema- the initial schemaoptions- the validator options- Returns:
- a validator instance
-
validate
public OutputUnit validate(Object instance)
Validate a given input against the initial schema- Parameters:
instance- instance to validate- Returns:
- returns a output unit object as defined by the options
-
-