confluent-kafka-dotnet
Show / Hide Table of Contents

Class CelValidator

A validation rule executor backed by CEL. Each rule expression is evaluated with this bound to the value being validated and now bound to the current time, and must return either a bool (false = failed) or a string (non-empty = failed, with that string as the failure message).

Inheritance
object
CelValidator
Implements
IValidationRuleExecutor
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Confluent.SchemaRegistry.Rules
Assembly: Confluent.SchemaRegistry.Rules.dll
Syntax
public class CelValidator : IValidationRuleExecutor

Constructors

CelValidator()

Creates a new CEL validation rule executor.

Declaration
public CelValidator()

Methods

Execute(ValidationRule, object, object)

Evaluates a single validation rule against a value.

Declaration
public Task<object> Execute(ValidationRule rule, object schema, object message)
Parameters
Type Name Description
ValidationRule rule

the rule to evaluate

object schema

a hint describing the value. A protobuf Google.Protobuf.Reflection.FieldDescriptor settles the CEL type from the field's own declared type; anything else leaves it to be inferred from the value

object message

the value to validate

Returns
Type Description
Task<object>

Register()

Registers this validator as the global inline validation rule executor.

Declaration
public static void Register()

Implements

IValidationRuleExecutor
In this article