Package io.vertx.rxjava.json.schema
Class Validator
- java.lang.Object
-
- io.vertx.rxjava.json.schema.Validator
-
public class Validator extends Object
A validator, validates some input object using a well known schema. NOTE: This class has been automatically generated from theoriginal
non RX-ified interface using Vert.x codegen.
-
-
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 Validator
create(JsonSchema schema, io.vertx.json.schema.JsonSchemaOptions options)
Creates a new validator with some initial schema and options.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.boolean
equals(Object o)
io.vertx.json.schema.Validator
getDelegate()
int
hashCode()
static Validator
newInstance(io.vertx.json.schema.Validator arg)
String
toString()
io.vertx.json.schema.OutputUnit
validate(Object instance)
Validate a given input against the initial schema.
-
-
-
Constructor Detail
-
Validator
public Validator(io.vertx.json.schema.Validator delegate)
-
Validator
public Validator(Object delegate)
-
-
Method Detail
-
getDelegate
public io.vertx.json.schema.Validator getDelegate()
-
create
public static Validator create(JsonSchema schema, io.vertx.json.schema.JsonSchemaOptions options)
Creates a new validator with some initial schema and options.When validation is to be reused, it is recommended to create a
SchemaRepository
instance and use theSchemaRepository.validator(io.vertx.rxjava.json.schema.JsonSchema)
} method. The use of aString
key 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 aSchemaRepository
instance and use theSchemaRepository.validator(io.vertx.rxjava.json.schema.JsonSchema)
} method. The use of aString
key 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)
Validate a given input against the initial schema.- Parameters:
instance
- instance to validate- Returns:
- returns a output unit object as defined by the options
-
newInstance
public static Validator newInstance(io.vertx.json.schema.Validator arg)
-
-