Skip to content

Assert

Assert (assert)

Validate an event against a JSON Schema, based on IETF’s draft v7 (http://json-schema.org).

Validation json

Minimal example

actions:
- assert:
behaviour:
no-warnings: drop-onfailure
schema:
schema-file: ""
JSON
{
"actions": [
{
"assert": {
"behaviour": {
"no-warnings": "drop-onfailure"
},
"schema": {
"schema-file": ""
}
}
}
]
}

Contents

Fields

FieldTypeRequiredDescription
schemaSchemaThe JSON schema to validate an event against.
behaviourBehaviourWhat the job should do if it encounters a schema violation.
descriptionstringdescribe this step.
conditionlua-expression (string)Only run this action if the specified condition is met.
Examples: 2 * count()
suppress-warningsboolean (bool)Suppress warnings generated by this action.

Schema

Schema Options

OptionNameTypeDescription
schema-fileSchema FilestringFile containing JSON schema.
Examples: /path/to/file, c:\users\joe\data\file.txt
schema-stringSchema StringstringJSON schema as text.

Behaviour Options

OptionNameTypeDescription
no-warningsNo WarningssymbolSwitch off warnings.
Allowed values: drop-onfailure, abort-on-failure
drop-onfailureDrop OnfailureboolJust Drop the Event.
abort-on-failureAbort On FailureboolAbort the job.

Behaviour - No Warnings Options

ValueDescription
drop-onfailureDrop Onfailure
abort-on-failureAbort On Failure