Skip to main content

a2ui_base/validate/
mod.rs

1//! A2UI payload & component validation (ported from Python `a2ui_core.validating`).
2//!
3//! This module provides integrity, topology, recursion/path, and payload-fixing
4//! validation that the Python side has but the Rust crate previously lacked.
5//! It is v0.9-flat only and does NOT port the Python catalog-schema validator
6//! (Rust has no runtime catalog schema).
7//!
8//! The validators collect ALL problems into a [`ValidationReport`] rather than
9//! short-circuiting on the first.
10
11pub mod config;
12pub mod error;
13pub mod integrity;
14pub mod payload_fixer;
15pub mod ref_fields;
16pub mod topology;
17
18pub use config::{ValidationConfig, RELAXED_VALIDATION, STRICT_VALIDATION};
19pub use error::{ValidationError, ValidationErrorCode, ValidationReport};
20pub use integrity::{
21    get_component_references, validate_component_integrity, validate_recursion_and_paths,
22    MAX_FUNC_CALL_DEPTH, MAX_GLOBAL_DEPTH,
23};
24pub use payload_fixer::parse_and_fix;
25pub use ref_fields::RefFieldSpec;
26pub use topology::analyze_topology;
27
28/// The conventional root component id (mirrors Python `ROOT_ID`).
29pub const ROOT_ID: &str = "root";