Validation trace.
Value validator.
Discriminated union of all concrete shape types for validating individual node values.
Infers the model type from a Lazy shape.
Checks whether a value is a valid Trace.
Checks whether a value is a valid Validator.
Checks whether a value is a valid ValueShape.
Linked data validation API.
Provides a type-safe DSL for defining resource shapes with validation constraints based on the Shapes Constraint Language (SHACL). Shapes define both the expected structure and validation rules for resources, enabling compile-time type inference and runtime validation.
Shape Types
ValueShape is a discriminated union of all concrete shape types:
Defining Shapes
Define resource shapes with property constraints and value ranges:
Validating Resources
Validate values against shapes using pattern matching on the Relay result:
Validation Modes
Beyond complete resource states, validate supports partial updates, projections, and queries:
Custom Validators
Implement custom resource-level constraints using Validator functions. Use collect to merge multiple facets into a single canonical trace:
See
SHACL - Shapes Constraint Language