ggen-engine 26.10.11

SPARQL-in-Tera code generation engine (vendored, renamed from praxis/crates/ggen)
//! Validate RDF/Turtle ontology graphs against praxis vocabulary constraints.
//
// GENERATED by `ggen sync` from `schema/praxis.ttl` (`praxis:CliCommand`
// instances). Do not edit by hand: routes are a pure projection of the
// ontology (mode = Overwrite); logic lives in `crate::verbs::handlers`.
//
// Flags (`praxis:flag`) render as boolean options; value-carrying args
// (`praxis:arg`, encoded "name:type::help") render after them, with type
// in {string, pathbuf, pathbufs}. `pathbufs` becomes a repeatable
// `--name` multi-value option (`#[arg(action = "append")]`,
// Vec<camino::Utf8PathBuf>, >=0 occurrences) — the only multi-value shape
// clap-noun-verb 26.7.4 transports (a bare positional is read as a single
// value). NOTE: a command carrying BOTH praxis:flag and praxis:arg would
// hit a flag×arg cross-product in this single-subquery SELECT; no graph
// command does today (validate has 0 flags), so it is left simple.

use clap_noun_verb::Result;

/// Load a Turtle ontology and report parse or constraint violations.
#[clap_noun_verb_macros::verb("validate")]
fn graph_validate(
    #[arg(action = "append")] files: Vec<camino::Utf8PathBuf>,
    #[arg(action = "append")] shapes: Vec<camino::Utf8PathBuf>,
) -> Result<serde_json::Value> {
    crate::verbs::handlers::handle_graph_validate(files, shapes)
}