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
|
|
@ -18,7 +18,7 @@ use crate::scheduled_prompts_worker::FireNowReport;
|
|||
|
||||
use super::{AppState, error_problem, error_response};
|
||||
|
||||
/// `GET /api/schedules` — snapshot of every schedule for the
|
||||
/// Snapshot of every schedule for the
|
||||
/// scheduled-prompts tab.
|
||||
///
|
||||
/// Returns the wire shape directly so the frontend can render
|
||||
|
|
@ -59,7 +59,7 @@ pub(super) async fn api_schedules(State(state): State<AppState>) -> Response {
|
|||
}
|
||||
}
|
||||
|
||||
/// `POST /api/schedules` — operator-direct schedule creation
|
||||
/// Operator-direct schedule creation
|
||||
/// (mara: "user can add them manually").
|
||||
///
|
||||
/// Accepts the same `SchedulePromptPayload` shape as the manager
|
||||
|
|
@ -122,7 +122,7 @@ pub(super) struct FireNowBody {
|
|||
reset_timer: bool,
|
||||
}
|
||||
|
||||
/// `POST /api/schedules/{id}/fire-now` — operator-initiated
|
||||
/// Operator-initiated
|
||||
/// out-of-band fire of a scheduled prompt.
|
||||
///
|
||||
/// Runs the per-target fan-out once immediately and reports
|
||||
|
|
@ -158,7 +158,7 @@ pub(super) async fn post_schedule_fire_now(
|
|||
}
|
||||
}
|
||||
|
||||
/// `POST /api/rebuild-queue/{id}/cancel` — drop still-queued work from the job
|
||||
/// Drop still-queued work from the job
|
||||
/// queue.
|
||||
///
|
||||
/// `id` is a **node** id. A DAG's root cancels the whole group (the scheduler
|
||||
|
|
@ -248,7 +248,7 @@ where
|
|||
T::deserialize(deserializer).map(Some)
|
||||
}
|
||||
|
||||
/// `PATCH /api/schedules/{id}` — partial update of an existing
|
||||
/// Partial update of an existing
|
||||
/// schedule.
|
||||
///
|
||||
/// Mutable fields: `body`, `description`, `interval_seconds`,
|
||||
|
|
@ -299,7 +299,7 @@ pub(super) async fn patch_schedule(
|
|||
}
|
||||
}
|
||||
|
||||
/// `POST /api/schedules/{id}/pause` — pause a schedule so the worker
|
||||
/// Pause a schedule so the worker
|
||||
/// skips it until explicitly resumed.
|
||||
///
|
||||
/// Idempotent; no-op on an already-paused row. Returns 404 when the
|
||||
|
|
@ -334,7 +334,7 @@ pub(super) async fn post_schedule_pause(
|
|||
}
|
||||
}
|
||||
|
||||
/// `POST /api/schedules/{id}/resume` — resume a paused schedule.
|
||||
/// Resume a paused schedule.
|
||||
///
|
||||
/// Idempotent; no-op on an already-active row. Returns 404 when the
|
||||
/// schedule is cancelled or not found.
|
||||
|
|
@ -368,7 +368,7 @@ pub(super) async fn post_schedule_resume(
|
|||
}
|
||||
}
|
||||
|
||||
/// `POST /api/schedules/{id}/cancel` — operator-side cancel
|
||||
/// Operator-side cancel
|
||||
/// (whole schedule when no `targets` field, partial when one is
|
||||
/// provided).
|
||||
///
|
||||
|
|
|
|||
Loading…
Reference in a new issue