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
|
|
@ -38,7 +38,7 @@ fn with_cors(resp: impl IntoResponse) -> Response {
|
|||
resp
|
||||
}
|
||||
|
||||
/// `POST /answer-question/{id}` — record the operator's answer and
|
||||
/// Record the operator's answer and
|
||||
/// notify the asker.
|
||||
#[utoipa::path(
|
||||
post,
|
||||
|
|
@ -94,7 +94,7 @@ pub(super) async fn post_answer_question(
|
|||
with_cors(resp)
|
||||
}
|
||||
|
||||
/// `POST /cancel-question/{id}` — resolve a pending question with the
|
||||
/// Resolve a pending question with the
|
||||
/// `[cancelled]` sentinel answer.
|
||||
///
|
||||
/// Used when the operator decides not to / can't answer. The asker
|
||||
|
|
|
|||
Loading…
Reference in a new issue