Greentic Flow
Generic schema, loader, and intermediate representation for YGTC flows composed of self-describing component nodes.
Features
- JSON Schema (
schemas/ygtc.flow.schema.json) enforces exactly one component key per node plus optional routing metadata. - Loader converts YAML documents to
FlowDoc, validates against the schema, extracts component metadata, and performs basic graph checks. - IR (
FlowIR) keeps nodes generic and serde-friendly so runtimes can post-process component payloads. resolve::resolve_parameterspre-resolves onlyparameters.*references, leaving other runtime bindings intact.startis optional; if omitted and aninnode exists, the loader defaultsstarttoin.
Usage
use ;
use Path;
let yaml = read_to_string?;
let flow = load_ygtc_from_str?;
let ir = to_ir?;
let node = ir.nodes.get.unwrap;
let resolved = resolve_parameters?;
# Ok::
Development
cargo fmt --checkcargo clippy -D warningscargo test
Fixtures under fixtures/ mirror common success and failure scenarios.
CLI
Run cargo run --bin ygtc-lint -- <paths> to validate flows. Example:
cargo run --bin ygtc-lint -- fixtures --schema schemas/ygtc.flow.schema.json