From ac22bdee4c0e61f1b409beacad94151c824c2a40 Mon Sep 17 00:00:00 2001 From: Raymond Jacobson Date: Wed, 20 May 2026 11:58:42 -0700 Subject: [PATCH] docs(swagger): add user_id query param to notifications endpoints MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The /notifications/{user_id} and /notifications/{user_id}/playlist_updates endpoints currently take the notifications owner via the URL path only. The backend computes personalization (e.g. does_current_user_follow on embedded related.users) from resolveMyIdMiddleware, which reads c.Query("user_id") — not the path. With no query value, MyID is 0 and every embedded user comes back with does_current_user_follow: false, polluting clients that prime related users into a shared cache. Declare an optional user_id query parameter on both endpoints so SDK consumers can send the requester id explicitly. This is kept separate from the path user_id because a manager may read a managed user's notifications, in which case the requester and the owner are different users. Co-Authored-By: Claude Opus 4.7 --- api/swagger/swagger-v1.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/api/swagger/swagger-v1.yaml b/api/swagger/swagger-v1.yaml index 7993a739..87402a2b 100644 --- a/api/swagger/swagger-v1.yaml +++ b/api/swagger/swagger-v1.yaml @@ -8194,6 +8194,15 @@ paths: required: true schema: type: string + - name: user_id + in: query + description: + The user ID of the user making the request. Required for + personalization of related users (e.g. does_current_user_follow) + in the response, and may differ from the path user_id when a + manager is reading a managed user's notifications. + schema: + type: string - name: timestamp in: query description: The timestamp from which to paginate @@ -8287,6 +8296,15 @@ paths: required: true schema: type: string + - name: user_id + in: query + description: + The user ID of the user making the request. Required for + personalization of related users (e.g. does_current_user_follow) + in the response, and may differ from the path user_id when a + manager is reading a managed user's playlist updates. + schema: + type: string responses: "200": description: Success