From 64cc11c2a13e407a07106c9cd442562ae02bb6f3 Mon Sep 17 00:00:00 2001 From: Gabriel Kaszewski Date: Fri, 29 May 2026 02:00:53 +0200 Subject: [PATCH] docs(openapi): annotate get_followers, get_following, get_popular_tags handlers --- crates/presentation/src/handlers/feed.rs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/crates/presentation/src/handlers/feed.rs b/crates/presentation/src/handlers/feed.rs index a35bcc1..4a237d0 100644 --- a/crates/presentation/src/handlers/feed.rs +++ b/crates/presentation/src/handlers/feed.rs @@ -197,6 +197,14 @@ pub async fn search_handler( }))) } +#[utoipa::path( + get, path = "/users/{username}/following", + params( + ("username" = String, Path, description = "Username"), + PaginationQuery, + ), + responses((status = 200, description = "Users this account follows")) +)] pub async fn get_following_handler( Deps(d): Deps, Path(param): Path, @@ -232,6 +240,14 @@ pub async fn get_following_handler( .into_response()) } +#[utoipa::path( + get, path = "/users/{username}/followers", + params( + ("username" = String, Path, description = "Username"), + PaginationQuery, + ), + responses((status = 200, description = "Accounts that follow this user")) +)] pub async fn get_followers_handler( Deps(d): Deps, Path(param): Path, @@ -304,6 +320,13 @@ pub async fn user_thoughts_handler( }))) } +#[utoipa::path( + get, path = "/tags/popular", + params( + ("limit" = Option, Query, description = "Max tags to return (default 20, max 100)"), + ), + responses((status = 200, description = "Most-used tags")) +)] pub async fn get_popular_tags( Deps(d): Deps, Query(params): Query>,