Skip to main content

Module validate

Module validate 

Source
Expand description

A2UI payload & component validation (ported from Python a2ui_core.validating).

This module provides integrity, topology, recursion/path, and payload-fixing validation that the Python side has but the Rust crate previously lacked. It is v0.9-flat only and does NOT port the Python catalog-schema validator (Rust has no runtime catalog schema).

The validators collect ALL problems into a ValidationReport rather than short-circuiting on the first.

Re-exports§

pub use config::ValidationConfig;
pub use config::RELAXED_VALIDATION;
pub use config::STRICT_VALIDATION;
pub use error::ValidationError;
pub use error::ValidationErrorCode;
pub use error::ValidationReport;
pub use integrity::get_component_references;
pub use integrity::validate_component_integrity;
pub use integrity::validate_recursion_and_paths;
pub use integrity::MAX_FUNC_CALL_DEPTH;
pub use integrity::MAX_GLOBAL_DEPTH;
pub use payload_fixer::parse_and_fix;
pub use ref_fields::RefFieldSpec;
pub use topology::analyze_topology;

Modules§

config
Validation configuration + STRICT/RELAXED presets.
error
Validation error types: structured codes + an aggregating report.
integrity
Component integrity + recursion/path validation.
payload_fixer
LLM-JSON autofixer — ports payload_fixer.py.
ref_fields
The set of property names that hold component references.
topology
Topology analysis — DFS cycle / self-reference / orphan / depth detection.

Constants§

ROOT_ID
The conventional root component id (mirrors Python ROOT_ID).