docs(docs): migrate GET /api/accounts/{id}/catalogs#153
Conversation
Move the account id from a query param to a path segment on the GET operation, drop the per-operation api.recoupable.com servers override so the page renders against recoup-api.vercel.app, and enumerate the full response code set the new handler emits (200, 400, 401, 403, 404, 500). POST and DELETE overrides stay on the legacy /api/catalogs path until their own migrations land.
📝 WalkthroughWalkthroughThe catalogs API path was changed from Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
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 docstrings
🧪 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.
1 issue found across 1 file
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:854">
P1: The Get Catalogs MDX page still references `get /api/catalogs`, but this PR moves that operation to `/api/accounts/{id}/catalogs`. Update the MDX `openapi` target to the new path to avoid a broken API reference page.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
…catalogs path The releases.json no longer exposes GET /api/catalogs after migration, so the page was rendering empty. Update the frontmatter to reference the new account-scoped path in releases.json.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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`:
- Around line 853-854: Re-add the legacy path key "/api/catalogs" to the OpenAPI
spec in releases.json containing only the post and delete operations (preserve
their operation definitions and schemas as they were) so
api-reference/songs/catalogs-create.mdx and catalogs-delete.mdx find matching
operations; do not reintroduce GET (since that moved to
"/api/accounts/{id}/catalogs"), ensure the operationId, requestBody, parameters
and responses for POST and DELETE match the original definitions so Mintlify can
auto-generate the request/response sections for those docs.
🪄 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: 29c8d05a-25ec-46d4-b02a-5f48fb53e6ee
📒 Files selected for processing (2)
api-reference/openapi/releases.jsonapi-reference/songs/catalogs.mdx
| }, | ||
| "/api/catalogs": { | ||
| "/api/accounts/{id}/catalogs": { |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Confirm that no /api/catalogs path key remains and that the MDX pages still reference it.
echo "=== /api/catalogs occurrences in releases.json ==="
rg -n '"/api/catalogs"' api-reference/openapi/releases.json || echo "(none — legacy path fully removed)"
echo
echo "=== MDX pages still referencing legacy /api/catalogs ==="
rg -n --type=md --type-add 'mdx:*.mdx' --type=mdx '^openapi:.*\b/api/catalogs\b' api-reference || trueRepository: recoupable/docs
Length of output: 202
🏁 Script executed:
#!/bin/bash
# Find the actual MDX files and check their content
echo "=== Locating catalogs-create.mdx ==="
fd -name "catalogs-create.mdx" api-reference
echo
echo "=== Locating catalogs-delete.mdx ==="
fd -name "catalogs-delete.mdx" api-reference
echo
echo "=== Locating all catalogs-related mdx files ==="
fd -name "*catalogs*.mdx" api-referenceRepository: recoupable/docs
Length of output: 892
🏁 Script executed:
#!/bin/bash
# Find the actual MDX files and check their content
echo "=== Locating catalogs-related mdx files ==="
fd "catalogs.*\.mdx" api-reference
echo
echo "=== Searching for any mdx files in api-reference ==="
fd "\.mdx$" api-reference | head -20Repository: recoupable/docs
Length of output: 974
🏁 Script executed:
#!/bin/bash
echo "=== Content of catalogs-create.mdx ==="
cat api-reference/songs/catalogs-create.mdx
echo
echo "=== Content of catalogs-delete.mdx ==="
cat api-reference/songs/catalogs-delete.mdx
echo
echo "=== Content of catalogs.mdx ==="
cat api-reference/songs/catalogs.mdxRepository: recoupable/docs
Length of output: 1106
🏁 Script executed:
#!/bin/bash
# Check what operations exist on /api/accounts/{id}/catalogs in releases.json
echo "=== Checking /api/accounts/{id}/catalogs operations ==="
rg -A 200 '"/api/accounts/\{id\}/catalogs"' api-reference/openapi/releases.json | head -250Repository: recoupable/docs
Length of output: 6431
🏁 Script executed:
#!/bin/bash
# Search for POST and DELETE operations on the accounts catalogs path
echo "=== Searching for POST on catalogs path ==="
rg -n '"post"' api-reference/openapi/releases.json | grep -i catalog
echo
echo "=== Searching for DELETE on catalogs path ==="
rg -n '"delete"' api-reference/openapi/releases.json | grep -i catalog
echo
echo "=== Full /api/catalogs search ==="
rg -n '/api/catalogs' api-reference/openapi/releases.json
echo
echo "=== Check if /api/accounts/{id}/catalogs has more than just get ==="
sed -n '/\/api\/accounts\/\{id\}\/catalogs/,/^ "\/api\//p' api-reference/openapi/releases.json | head -50Repository: recoupable/docs
Length of output: 359
🏁 Script executed:
#!/bin/bash
# Final verification: check releases.json structure around accounts catalogs to confirm only GET exists
echo "=== Lines 850-900 of releases.json showing /api/accounts/{id}/catalogs ==="
sed -n '850,900p' api-reference/openapi/releases.jsonRepository: recoupable/docs
Length of output: 1696
Removing the /api/catalogs path key breaks the Create Catalogs and Delete Catalogs doc pages.
This PR drops the entire /api/catalogs path key from releases.json, but api-reference/songs/catalogs-create.mdx still has openapi: post /api/catalogs and api-reference/songs/catalogs-delete.mdx still has openapi: delete /api/catalogs. With no matching operation in any mounted spec, Mintlify will render those two pages with only the title/description and no auto-generated request/response section — the exact failure mode that motivated commit 3 for catalogs.mdx.
The PR description also explicitly states POST and DELETE should remain on the legacy path until their own migrations land, so this removal appears unintended.
The new /api/accounts/{id}/catalogs path only includes the GET operation; POST and DELETE are entirely missing from the spec.
Two options to unbreak those pages before merge:
- Re-add the legacy
/api/catalogskey with only thepostanddeleteoperations preserved (keep GET removed since it has moved). - Migrate
catalogs-create.mdxandcatalogs-delete.mdxto reference the new account-scoped paths in the same PR (requires server-side routes to exist for POST/DELETE).
Option 1 matches the stated merge plan most closely.
🔧 Proposed fix — restore legacy path with POST/DELETE only
+ "/api/catalogs": {
+ "post": { /* preserved POST operation spec */ },
+ "delete": { /* preserved DELETE operation spec */ }
+ },
"/api/accounts/{id}/catalogs": {
"get": {🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@api-reference/openapi/releases.json` around lines 853 - 854, Re-add the
legacy path key "/api/catalogs" to the OpenAPI spec in releases.json containing
only the post and delete operations (preserve their operation definitions and
schemas as they were) so api-reference/songs/catalogs-create.mdx and
catalogs-delete.mdx find matching operations; do not reintroduce GET (since that
moved to "/api/accounts/{id}/catalogs"), ensure the operationId, requestBody,
parameters and responses for POST and DELETE match the original definitions so
Mintlify can auto-generate the request/response sections for those docs.
These MDX pages referenced the legacy /api/catalogs POST/DELETE operations that were removed from releases.json. The verbs have no live caller and are not scheduled for migration. Also drop the Note callout on the Get Catalogs page referencing them.
Mintlify preview — GET /api/accounts/{id}/catalogsCaptured from a local
Rolling comment — will be replaced on further changes and the |

Replace legacy
GET /api/catalogsoperation withGET /api/accounts/{id}/catalogsonrecoup-api.vercel.app; account id moves from query to path; drop unusedPOST/DELETEentries.Test plan
recoup-api.vercel.appand{id}path param200, 400, 401, 403, 404, 500/api/catalogspath key absent fromreleases.jsonSummary by CodeRabbit
/api/accounts/{id}/catalogswith account ID as a required path parameter