FluxFlow.Components.Validation
3.0.0
See the version list below for details.
dotnet add package FluxFlow.Components.Validation --version 3.0.0
NuGet\Install-Package FluxFlow.Components.Validation -Version 3.0.0
<PackageReference Include="FluxFlow.Components.Validation" Version="3.0.0" />
<PackageVersion Include="FluxFlow.Components.Validation" Version="3.0.0" />
<PackageReference Include="FluxFlow.Components.Validation" />
paket add FluxFlow.Components.Validation --version 3.0.0
#r "nuget: FluxFlow.Components.Validation, 3.0.0"
#:package FluxFlow.Components.Validation@3.0.0
#addin nuget:?package=FluxFlow.Components.Validation&version=3.0.0
#tool nuget:?package=FluxFlow.Components.Validation&version=3.0.0
FluxFlow.Components.Validation
A standalone JSON schema validator node for FluxFlow. It depends only on
FluxFlow.Nodes — no engine, registry, or runtime. You new the node and
LinkTo the next one.
Node
| Node | Shape | Purpose |
|---|---|---|
JsonSchemaValidatorNode<TInput> |
Input → Output (result), Valid, Invalid |
Validates a selected value with a JSON schema. |
Every message travels as a FlowMessage<T> envelope. The validation result is
broadcast on Output as FlowMessage<JsonSchemaValidationResult<TInput>>; the
original input is fanned to Valid or Invalid (each FlowMessage<TInput>).
All three carry the same correlation id as the input.
var schema = new JsonSchemaValidatorOptions
{
Schema = JsonSerializer.SerializeToElement(new
{
type = "object",
required = new[] { "id" },
properties = new { id = new { type = "string" } }
}),
SchemaId = "orders"
}.LoadSchema();
await using var node = new JsonSchemaValidatorNode<JsonElement>(schema, schemaId: "orders");
node.Output.LinkTo(resultSink, new DataflowLinkOptions { PropagateCompletion = false });
node.Valid.LinkTo(validSink, new DataflowLinkOptions { PropagateCompletion = false });
node.Invalid.LinkTo(invalidSink, new DataflowLinkOptions { PropagateCompletion = false });
await node.Input.SendAsync(FlowMessage.Create(order));
JsonSchemaValidatorOptions.LoadSchema() compiles the schema once (from inline
Schema or SchemaPath), so the node never performs File I/O or compilation in
its pump. A missing or malformed schema throws InvalidOperationException at
that point — configuration mistakes fail fast.
Value selectors
By default the node validates the whole payload. Pass an
IJsonSchemaValueSelector<TInput> to select a value from the payload (e.g. an
inner property), plus a valueSelector name carried into the validation result
and selector context:
var node = new JsonSchemaValidatorNode<AppMessage>(
schema,
selector: new PayloadSelector(),
valueSelector: "payload");
The node accepts JsonElement, JsonDocument, JsonNode, byte[], string
(parsed as JSON when possible, otherwise treated as a string value), and plain
objects (serialized) as selected values.
Behavior
Invalid data is not an error: the node emits a result and routes the original
input to Invalid. Value-selection, value-conversion, and schema-evaluation
failures emit a FlowError on Errors (carrying the input's correlation id and
a Code from ValidationErrorCodes) and the node keeps processing later
messages. A one-time json.schema-validator.loaded event is emitted on
construction, and per-message valid/invalid/failed events flow on the
Events port.
Runtime timing
Validation results use the node's clock for Timestamp (default
TimeProvider.System). Provide a deterministic clock for tests:
new JsonSchemaValidatorNode<JsonElement>(schema, clock: new FakeTimeProvider(timestamp));
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- FluxFlow.Nodes (>= 1.0.0)
- JsonSchema.Net (>= 9.2.1)
-
net8.0
- FluxFlow.Nodes (>= 1.0.0)
- JsonSchema.Net (>= 9.2.1)
- System.Threading.Tasks.Dataflow (>= 9.0.4)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on FluxFlow.Components.Validation:
| Package | Downloads |
|---|---|
|
FluxFlow.Components.Validation.Composition
Optional FluxFlow.Composition registration and Designer metadata for explicit JsonElement JSON Schema validation. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 7.0.0-rc.1 | 69 | 9/5/2026 |
| 6.0.0 | 166 | 8/3/2026 |
| 3.0.2 | 121 | 7/3/2026 |
| 3.0.1 | 163 | 7/2/2026 |
| 3.0.0 | 122 | 6/19/2026 |
| 2.0.0 | 134 | 6/18/2026 |
| 1.3.0 | 127 | 6/15/2026 |
| 1.2.0 | 428 | 6/12/2026 |
| 1.1.0 | 113 | 6/5/2026 |
| 1.0.0 | 119 | 6/4/2026 |
| 0.2.0-alpha.1 | 233 | 6/2/2026 |
| 0.1.1-alpha.1 | 71 | 6/2/2026 |
| 0.1.0-alpha.1 | 125 | 6/1/2026 |
Rebuilt as a single standalone json.schema-validator node over a pre-compiled JSON schema: input in, validation result broadcast out, original input fanned to the Valid/Invalid ports, failures on the error port — all carrying the message correlation id. The engine factory, module, registration extensions, design-metadata provider, definition-options reader, and the type/selector resolution layer are removed; the node takes its schema, value selector, and TimeProvider directly and depends only on FluxFlow.Nodes (runs without the engine).