hive-c0re: drop redundant METHOD/path prefixes from OpenAPI summaries
Swagger UI's endpoint-list row already shows the HTTP method badge + path for every row, so restating `METHOD /path` at the start of a handler's own summary is pure duplication. Strips that self-referential prefix from every summary that has it and re-capitalizes what follows as a standalone sentence. Left two false positives untouched: misc_api.rs's operator-inbox summary cross-references a *different* sibling endpoint (mark-all-read) for context, and topology.rs's SetParentForm struct doc happens to mention its endpoint's path but isn't a handler summary line. Both are legitimate, not redundant.
This commit is contained in:
parent
071dbd774c
commit
ec30277a90
16 changed files with 49 additions and 49 deletions
|
|
@ -37,7 +37,7 @@ pub(super) struct ToolGroupsSnapshot {
|
|||
effective: std::collections::BTreeMap<String, Vec<String>>,
|
||||
}
|
||||
|
||||
/// `GET /api/tool-groups` — every known tool-group name + description,
|
||||
/// Every known tool-group name + description,
|
||||
/// plus the per-agent explicit/effective assignment maps.
|
||||
#[utoipa::path(
|
||||
get,
|
||||
|
|
@ -119,7 +119,7 @@ pub(super) struct SetToolGroupsBody {
|
|||
groups: Vec<String>,
|
||||
}
|
||||
|
||||
/// `POST /api/tool-groups/{agent}` — replace `agent`'s explicit tool-group
|
||||
/// Replace `agent`'s explicit tool-group
|
||||
/// assignment (JSON body `{"groups": [...]}`).
|
||||
#[utoipa::path(
|
||||
post,
|
||||
|
|
@ -187,7 +187,7 @@ pub(super) struct CapabilitiesSnapshot {
|
|||
effective: std::collections::BTreeMap<String, Vec<String>>,
|
||||
}
|
||||
|
||||
/// `GET /api/capabilities` — every known capability name + description,
|
||||
/// Every known capability name + description,
|
||||
/// plus the per-agent explicit/effective grant maps.
|
||||
#[utoipa::path(
|
||||
get,
|
||||
|
|
@ -227,7 +227,7 @@ pub(super) struct SetCapabilitiesBody {
|
|||
caps: Vec<String>,
|
||||
}
|
||||
|
||||
/// `POST /api/capabilities/{agent}` — replace `agent`'s explicit capability
|
||||
/// Replace `agent`'s explicit capability
|
||||
/// grant set (JSON body `{"caps": [...]}`).
|
||||
#[utoipa::path(
|
||||
post,
|
||||
|
|
@ -383,7 +383,7 @@ pub(super) struct StalePermsResponse {
|
|||
stale: Vec<String>,
|
||||
}
|
||||
|
||||
/// `GET /api/permissions/stale` — agent names with explicit permission
|
||||
/// Agent names with explicit permission
|
||||
/// entries but no matching live container or kept-state dir.
|
||||
#[utoipa::path(
|
||||
get,
|
||||
|
|
|
|||
Loading…
Reference in a new issue