From d05136627995eb76d39e807543974af5e17d8856 Mon Sep 17 00:00:00 2001 From: Raymond Jacobson Date: Wed, 20 May 2026 15:16:29 -0700 Subject: [PATCH] docs(swagger): add user_id query to three cache-priming endpoints MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GET /events/remix-contests, GET /users/{id}/contests, and GET /playlists/new-releases all embed user objects (track owners / contest hosts / album creators) in their responses, and their handlers already call app.getMyId(c) to feed MyID into the Parallel query that hydrates related users (does_current_user_follow etc). But their SDK request types didn't expose a user_id query field, so the wire request never carried the requester id and the backend computed personalization against MyID=0 — every embedded user came back with does_current_user_follow: false. Clients prime those embedded users into a shared user cache (primeRelatedData / primeCollectionData → primeUserData), and the cache write only happens when the slot is empty, so the bad state sticks until a personalized fetch overwrites it. Same shape as the bug fixed for /notifications in #837 / #838. Spec-only change. resolveMyIdMiddleware already reads ?user_id= from the query, so the Go handlers personalize correctly as soon as clients start sending the param. Co-Authored-By: Claude Opus 4.7 --- api/swagger/swagger-v1.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/api/swagger/swagger-v1.yaml b/api/swagger/swagger-v1.yaml index 22fd4301..887dc495 100644 --- a/api/swagger/swagger-v1.yaml +++ b/api/swagger/swagger-v1.yaml @@ -1232,6 +1232,14 @@ paths: - active - ended - all + - 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. + schema: + type: string responses: "200": description: Success @@ -1785,6 +1793,14 @@ paths: enum: - playlist - album + - 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. + schema: + type: string responses: "200": description: Success @@ -5580,6 +5596,14 @@ paths: - active - ended - all + - 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. + schema: + type: string responses: "200": description: Success