docs: repoint /api/fans to /api/artists/{id}/fans#143
Conversation
Rename the OpenAPI path key from `/api/fans` to `/api/artists/{id}/fans`,
move the `artist_account_id` query param to a required `{id}` path param,
and drop the per-operation `servers` override so the top-level
`https://recoup-api.vercel.app` server applies. Response schemas are
unchanged.
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughReplaced Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@api-reference/openapi/releases.json`:
- Line 810: The Fans docs page still references the old OpenAPI operation path;
open the api-reference/fans/get.mdx file and update its frontmatter openapi
value from the old string containing "GET /api/fans" to the new spec operation
"GET /api/artists/{id}/fans" (i.e. change the openapi frontmatter line to point
to "/api-reference/openapi/releases.json GET /api/artists/{id}/fans") so
Mintlify can resolve the migrated path.
- Around line 875-884: The 401 response currently references the generic "Error"
schema; update the 401 response object to reference the
"ArtistFansErrorResponse" schema (same as 400/500) so all error responses use
the consistent ArtistFansErrorResponse shape; locate the "401" response entry in
the OpenAPI responses block and replace the $ref from
"#/components/schemas/Error" to "#/components/schemas/ArtistFansErrorResponse",
and then verify the API implementation actually returns the
ArtistFansErrorResponse body for 401 to keep the spec accurate.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 148c31dc-2a20-4c69-a403-eb2a337972fb
📒 Files selected for processing (1)
api-reference/openapi/releases.json
…nse schema
- api-reference/fans/get.mdx now references GET /api/artists/{id}/fans
- Remove dead ArtistFansErrorResponse schema (endpoint uses generic Error)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
There was a problem hiding this comment.
2 issues found across 2 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="api-reference/openapi/releases.json">
<violation number="1" location="api-reference/openapi/releases.json:812">
P1: Custom agent: **Flag AI Slop and Fabricated Changes**
Rule 3 violation: the PR description claims API key + Bearer auth and newly added 401/500 responses, but this change documents API key-only auth and removes `bearerAuth`, so the stated behavior is not implemented.</violation>
<violation number="2" location="api-reference/openapi/releases.json:867">
P1: Changing artist-fans error responses to the generic `Error` schema alters the documented error payload shape and can break consumers expecting the prior artist-fans error contract.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
…s-path # Conflicts: # api-reference/openapi/releases.json
There was a problem hiding this comment.
1 issue found across 1 file (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="api-reference/openapi/releases.json">
<violation number="1" location="api-reference/openapi/releases.json:1454">
P2: This renames response fields in `ArtistFan`, introducing an additional breaking contract change beyond the path migration.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| "description": "Fan's biography or profile description" | ||
| }, | ||
| "followerCount": { | ||
| "follower_count": { |
There was a problem hiding this comment.
P2: This renames response fields in ArtistFan, introducing an additional breaking contract change beyond the path migration.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At api-reference/openapi/releases.json, line 1454:
<comment>This renames response fields in `ArtistFan`, introducing an additional breaking contract change beyond the path migration.</comment>
<file context>
@@ -1451,11 +1451,11 @@
"description": "Fan's biography or profile description"
},
- "followerCount": {
+ "follower_count": {
"type": "integer",
"description": "Number of followers the fan has"
</file context>
The endpoint is now /api/artists/{id}/fans — an artist-scoped resource,
not a release one. Move the Fans nav group under the Artists tab so the
IA matches the route shape.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Renames the OpenAPI path
/api/fansto/api/artists/{id}/fanswith a required UUID path param, drops theartist_account_idquery param and the per-operationserversoverride, and documents API-key auth plus snake_case response fields.Test plan
Summary by CodeRabbit
API Changes
GET /api/artists/{id}/fanswith required artist ID path parameterfollower_count,following_count)Documentation