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
|
|
@ -30,7 +30,7 @@ use super::{AppState, Ident, error_response, guard_agent_name, strip_container_p
|
|||
use crate::job_queue::{Source, submit};
|
||||
use crate::{actions, lifecycle};
|
||||
|
||||
/// `POST /api/rebuild/{name}` — queue a rebuild DAG for `name`.
|
||||
/// Queue a rebuild DAG for `name`.
|
||||
#[utoipa::path(
|
||||
post,
|
||||
path = "/api/rebuild/{name}",
|
||||
|
|
@ -59,7 +59,7 @@ pub(super) async fn post_rebuild(
|
|||
(StatusCode::OK, "ok").into_response()
|
||||
}
|
||||
|
||||
/// `POST /api/kill/{name}?graceful=1` — stop `name`, hard by default or
|
||||
/// Stop `name`, hard by default or
|
||||
/// gracefully when `graceful=1`.
|
||||
///
|
||||
/// Graceful mode: quiesce → drain → stop.
|
||||
|
|
@ -121,7 +121,7 @@ pub(super) async fn post_kill(
|
|||
(StatusCode::OK, "ok").into_response()
|
||||
}
|
||||
|
||||
/// `POST /api/restart/{name}?graceful=1` — restart `name`, hard by default
|
||||
/// Restart `name`, hard by default
|
||||
/// or gracefully when `graceful=1`.
|
||||
///
|
||||
/// Graceful mode: quiesce → drain → restart.
|
||||
|
|
@ -176,7 +176,7 @@ pub(super) struct StartParams {
|
|||
paused: bool,
|
||||
}
|
||||
|
||||
/// `POST /api/start/{name}?paused=1` — start `name`, optionally paused.
|
||||
/// Start `name`, optionally paused.
|
||||
///
|
||||
/// Plain `?paused=1` mirrors `hivectl agent <name> start --paused`: if
|
||||
/// `name` is already running, this just writes the pause marker in place
|
||||
|
|
@ -236,7 +236,7 @@ pub(super) async fn post_start(
|
|||
(StatusCode::OK, "ok").into_response()
|
||||
}
|
||||
|
||||
/// `POST /api/pause/{name}` — write the pause marker for `name`.
|
||||
/// Write the pause marker for `name`.
|
||||
///
|
||||
/// Unlike the lifecycle ops above this is not a DAG: it writes a single
|
||||
/// marker file, which the harness stats at the top of its serve loop.
|
||||
|
|
@ -275,7 +275,7 @@ pub(super) async fn post_pause(
|
|||
(StatusCode::OK, "ok").into_response()
|
||||
}
|
||||
|
||||
/// `POST /api/resume/{name}` — remove the pause marker for `name`.
|
||||
/// Remove the pause marker for `name`.
|
||||
///
|
||||
/// The inverse of `post_pause`. Removing a non-existent marker is a no-op
|
||||
/// (idempotent). Triggers an immediate rescan so the paused badge clears.
|
||||
|
|
@ -321,7 +321,7 @@ pub(super) struct ResourceLimitsForm {
|
|||
memory_max: String,
|
||||
}
|
||||
|
||||
/// `POST /api/resource-limits/{name}` — write per-agent CPU/memory limit
|
||||
/// Write per-agent CPU/memory limit
|
||||
/// overrides for `name`.
|
||||
///
|
||||
/// An empty `cpu_quota` or `memory_max` field clears that field's override,
|
||||
|
|
@ -394,7 +394,7 @@ pub(super) async fn post_resource_limits(
|
|||
(StatusCode::OK, "ok").into_response()
|
||||
}
|
||||
|
||||
/// `POST /api/update-all` — queue a rebuild DAG for every live agent
|
||||
/// Queue a rebuild DAG for every live agent
|
||||
/// container.
|
||||
#[utoipa::path(
|
||||
post,
|
||||
|
|
@ -427,7 +427,7 @@ pub(super) struct DestroyForm {
|
|||
purge: Option<String>,
|
||||
}
|
||||
|
||||
/// `POST /api/destroy/{name}` — destroy `name`'s container.
|
||||
/// Destroy `name`'s container.
|
||||
///
|
||||
/// Form field `purge` (any non-empty value, e.g. `"on"`) also wipes the
|
||||
/// retained state dir instead of leaving a tombstone.
|
||||
|
|
|
|||
Loading…
Reference in a new issue