Interface SchemaBasedCondition

Represents a condition to be evaluated.

interface SchemaBasedCondition {
    failWhenUndefined?: boolean;
    schema: JsonSchema;
    scope: string;
    type?: string;
}

Hierarchy (view full)

Properties

failWhenUndefined?: boolean

When the scope resolves to undefined and failWhenUndefined is set to true, the condition will fail. Therefore the reverse effect will be applied.

Background: Most JSON Schemas will successfully validate against undefined data. Specifying that a condition shall fail when data is undefined requires to lift the scope to being able to use JSON Schema's required.

Using failWhenUndefined allows to more conveniently express this condition.

schema: JsonSchema
scope: string

The scope that determines to which part this element should be bound to.

type?: string

The type of condition.