Validate Event

This handler (com.rierino.handler.ValidationEventHandler) provides ability to check validity of event contents using different validator types.

Handler Parameters

Parameter
Definition
Example
Default

validator

Fully qualified class name for the validator to use

com.rierino.handler.util.validator.JsonSchemaValidator

-

validator.*

Additional parameters used by the validator class

state=schema

-

Following validators are available (which can be also used as validators within state managers):

JMESValidator

Validates input against a given "pattern". Pattern information can be provided as a handler or action event metadata parameter. Returns a "valid" flag in results.

JsonSchemaValidator

Validates input against a Json schema stored in a state manager. Uses the following handler parameters:

Parameter
Definition
Example
Default

validator.state

State manager with schema records.

-

schema

validator.version

Json schema version to use for validation.

-

V201909

Also uses the following action event metadata parameter:

Parameter
Definition
Example
Default

schema

Id of the schema record to use for current event validation.

product

-

Returns a "valid" flag as well as "validations" list of findings.

Actions

Validate

Checks validity of the event input payload using configured validator instance and returns results.

Field
Definition
Example
Default

inputElement

Json path in payload to use

parameters

-

outputElement

Json path in payload to return results

result

-

With event metadata parameters as:

Parameter
Definition
Example
Default

outputPattern

JMESPath expression to convert results

-

-

*

Additional parameters used by the validator class

pattern=(value='a')

Last updated