pub fn module() -> ModuleDescriptorExpand description
The module: the vocabulary every clone shares, and the closure only this checkout can answer.
Both are read-only and neither has a command-line projection, for the reason
super::continuity states about the local half: majordomus check and
majordomus finish are already the command line’s answer to this question, and a
second verb would be a second account of the same judgement.
use majordomus_cli::capability::builtin::obligations::module;
let m = module();
assert_eq!(m.id.as_str(), "obligations");
// every projection is derived from the declaration; none is written anywhere else
let routes: Vec<&str> = m
.capabilities
.iter()
.filter_map(|e| e.capability.exposure.http.as_ref().map(|h| h.path.as_str()))
.collect();
assert_eq!(routes, ["/api/v1/obligations", "/api/v1/obligations/closure"]);