Skip to main content

Module condition

Module condition 

Source
Expand description

The condition node — a pure branching waypoint. Evaluates a boolean condition expression against the context and routes the request through the true or false outcome port. Evaluation is lenient, matching every other expression consumer in the gateway: an absent variable evaluates as the empty string (so a positive comparison over it is simply false) and a JSONPath subject over an empty or non-JSON body matches zero nodes; use the present/absent operators to test existence explicitly.

The expression grammar is shared with request-validation (crate::vars::Expr): top-level rules ANDed, nested AND/OR/NOT groups, variable and JSONPath subjects. The node never mutates the request or response.

Structs§

ConditionPlugin
Routes the context through true or false depending on a compiled condition expression.