Skip to content

docs: repoint /api/fans to /api/artists/{id}/fans#143

Merged
sweetmantech merged 9 commits into
mainfrom
chore/docs-artist-fans-path
Apr 21, 2026
Merged

docs: repoint /api/fans to /api/artists/{id}/fans#143
sweetmantech merged 9 commits into
mainfrom
chore/docs-artist-fans-path

Conversation

@arpitgupta1214
Copy link
Copy Markdown
Collaborator

@arpitgupta1214 arpitgupta1214 commented Apr 17, 2026

Renames the OpenAPI path /api/fans to /api/artists/{id}/fans with a required UUID path param, drops the artist_account_id query param and the per-operation servers override, and documents API-key auth plus snake_case response fields.

Test plan

  • OpenAPI JSON parses
  • Mintlify preview renders the new artist-scoped path with path param + auth

Summary by CodeRabbit

  • API Changes

    • Restructured artist fans endpoint to GET /api/artists/{id}/fans with required artist ID path parameter
    • Updated response field names to snake_case format (follower_count, following_count)
    • Added authentication and server error responses
  • Documentation

    • Updated API documentation to reflect new endpoint structure
    • Reorganized documentation under Artists section

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.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 17, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

Replaced GET /api/fans with GET /api/artists/{id}/fans (artist id moved from required query to required UUID path param). Updated responses to include 401 and 500 and renamed ArtistFan schema fields from followerCount/followingCount to follower_count/following_count. Documentation and navigation updated accordingly.

Changes

Cohort / File(s) Summary
OpenAPI spec
api-reference/openapi/releases.json
Removed GET /api/fans. Added GET /api/artists/{id}/fans with required path param id (UUID), preserved page/limit query params, added 401 and 500 error responses (using ArtistFansErrorResponse). Renamed components.schemas.ArtistFan fields: followerCountfollower_count, followingCountfollowing_count.
Docs frontmatter
api-reference/fans/get.mdx
Updated OpenAPI frontmatter to reflect new path GET /api/artists/{id}/fans (artist identifier moved from query param to path param).
Site navigation
docs.json
Moved api-reference/fans/get entry from the “Releases” tab to the “Artists” tab in the docs navigation (no pages added or removed).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I hopped through paths both new and old,
Artist IDs now proudly bold,
Fans found under artists' door,
Counts in snake_case — tidy score,
Hop, fetch, document — carrots cold. 🥕

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely summarizes the main change: repointing the /api/fans endpoint to /api/artists/{id}/fans, which is the primary objective reflected in all three modified files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/docs-artist-fans-path

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 8113795 and 486e1f4.

📒 Files selected for processing (1)
  • api-reference/openapi/releases.json

Comment thread api-reference/openapi/releases.json
Comment thread 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>
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread api-reference/openapi/releases.json Outdated
Comment thread api-reference/openapi/releases.json Outdated
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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": {
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot Apr 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Fix with Cubic

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>
@sweetmantech sweetmantech merged commit a7f9529 into main Apr 21, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants