pub fn catalogue_names(catalogue: &AdvisorCatalogue) -> Vec<String>Expand description
The names the independent code must not spell.
Every advisor’s id, adapter, executable, provider, vendor and model, and the peer
adapter when peers are declared: each once, in canonical order. These are the
literals the coupling check looks for.
use majordomus_cli::reasoning::catalogue::AdvisorCatalogue;
use majordomus_cli::reasoning::check::catalogue_names;
let catalogue: AdvisorCatalogue = majordomus_cli::metadata::yaml::parse_into(
"version: 1\nadvisors:\n - id: alpha\n title: Alpha\n transport: cli\n adapter: alpha-cli\n executable: alpha\n",
)
.unwrap();
assert_eq!(catalogue_names(&catalogue), ["alpha", "alpha-cli"]);