Class Validator
java.lang.Object
io.vertx.rxjava3.json.schema.Validator
- All Implemented Interfaces:
io.vertx.lang.rx.RxDelegate
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Validatorcreate(JsonSchema schema, JsonSchemaOptions options) Creates a new validator with some initial schema and options.static Validatorcreate(JsonSchema schema, JsonSchemaOptions options, JsonFormatValidator jsonFormatValidator) Creates a new validator with some initial schema, options and a custom JSON format validator.booleaninthashCode()static ValidatornewInstance(Validator arg) toString()Validate a given input against the initial schema.
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
Validator
-
Validator
-
-
Method Details
-
toString
-
equals
-
hashCode
-
getDelegate
- Specified by:
getDelegatein interfaceio.vertx.lang.rx.RxDelegate
-
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(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
-
create
public static Validator create(JsonSchema 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(JsonSchema)} 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
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
-