polyspec_crudui_validator/compose/mod.rs
1//! CRUDUI composition engine — SPEC §5, G5.
2//!
3//! The parser's first pass: expand `$ref` (base inheritance) then `$patch`
4//! (add/remove/replace + deep-path set) into a single, composition-free spec,
5//! BEFORE the field layer / validation / render. Unresolved composition is a LOAD
6//! ERROR (`ComposeLoadError`) — never `valid:true`.
7//!
8//! Byte-for-byte parity with the JS reference engine
9//! (`packages/validator/ts/src/compose`); the shared 4-language fixture
10//! `tests/fixtures/compose/cases.json` is the single source of truth.
11
12// Intentional: `compose/compose.rs` mirrors the JS reference layout
13// (`packages/validator/ts/src/compose/compose.ts`), the byte-for-byte parity
14// source. Renaming would diverge the two engines' file maps; the re-exports
15// below flatten the path for callers (`compose::compose_spec`).
16#[allow(clippy::module_inception, reason = "compose/compose.rs mirrors the file map of the other engines")]
17pub mod compose;
18pub mod errors;
19pub mod loader;
20pub mod member_order;
21mod members;
22pub mod patch;
23pub mod ref_;
24
25pub use compose::{compose_properties, compose_spec, ComposeOptions};
26pub use errors::{ComposeErrorCode, ComposeLoadError, ComposeResult};
27pub use loader::{FileLoader, LoadedDoc, MemoryLoader};
28pub use member_order::{member_ordered, member_ordered_map};
29pub use patch::apply_patch;
30pub use ref_::resolve_ref;