Skip to main content

Module validation

Module validation 

Source
Expand description

Validation layer for NAP structured merge.

Three stages:

Stage 1 — SDL validation Ensure the SDL document itself is valid:

  • Valid merge strategy for each property
  • Required fields exist
  • Identity keys defined where required
  • Property names don’t contain dots (V1 limitation)

Stage 2 — Manifest validation Ensure the manifest conforms to the SDL:

  • Required fields are present
  • Types match the schema

Stage 3 — Merge strategy validation Ensure merge strategies have all required metadata:

  • ordered_unique has identity rule
  • edge_list has source_key, target_key, identity rule

All validation MUST complete before persistence.

Modules§

manifest
Manifest validation against SDL (Stage 2).
merge
Post-merge validation (Stage 3).
sdl
SDL document validation (Stage 1).

Structs§

ValidationError
A validation error.

Functions§

check_required_paths
Check that all required paths exist in a value.
check_type_match
Check that a value’s type matches the SDL property type.
combine
Combine multiple validation results.
validate_before_persist
Run the full validation pipeline on a merge result.

Type Aliases§

ValidationResult
Result type for validation operations.