-
Notifications
You must be signed in to change notification settings - Fork 4
docs(docs): migrate GET /api/accounts/{id}/catalogs #153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
2e9b46e
b937301
2bb54c3
98d7ecb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -851,18 +851,13 @@ | |
| } | ||
| } | ||
| }, | ||
| "/api/catalogs": { | ||
| "/api/accounts/{id}/catalogs": { | ||
|
Comment on lines
853
to
+854
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 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 This PR drops the entire 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 Two options to unbreak those pages before merge:
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 |
||
| "get": { | ||
| "servers": [ | ||
| { | ||
| "url": "https://api.recoupable.com" | ||
| } | ||
| ], | ||
| "description": "Retrieve catalogs associated with a specific account. The endpoint joins account_catalogs with catalogs to return catalog metadata for the specified account.", | ||
| "parameters": [ | ||
| { | ||
| "name": "account_id", | ||
| "in": "query", | ||
| "name": "id", | ||
| "in": "path", | ||
| "description": "The unique identifier of the account to query", | ||
| "required": true, | ||
| "schema": { | ||
|
|
@@ -883,7 +878,7 @@ | |
| } | ||
| }, | ||
| "400": { | ||
| "description": "Bad request - missing or invalid account_id", | ||
| "description": "Bad request - missing or invalid account id", | ||
| "content": { | ||
| "application/json": { | ||
| "schema": { | ||
|
|
@@ -892,90 +887,38 @@ | |
| } | ||
| } | ||
| }, | ||
| "404": { | ||
| "description": "Account not found or no catalogs found", | ||
| "401": { | ||
| "description": "Unauthorized - missing or invalid authentication", | ||
| "content": { | ||
| "application/json": { | ||
| "schema": { | ||
| "$ref": "#/components/schemas/CatalogsErrorResponse" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "post": { | ||
| "servers": [ | ||
| { | ||
| "url": "https://api.recoupable.com" | ||
| } | ||
| ], | ||
| "description": "Create new catalogs or link existing catalogs to an account. If catalog_id is provided, links the existing catalog. If name is provided without catalog_id, creates a new catalog. If both are provided, catalog_id takes priority.", | ||
| "requestBody": { | ||
| "description": "Array of catalogs to create or link", | ||
| "required": true, | ||
| "content": { | ||
| "application/json": { | ||
| "schema": { | ||
| "$ref": "#/components/schemas/CreateCatalogsRequest" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "responses": { | ||
| "200": { | ||
| "description": "Catalogs created or linked successfully", | ||
| "content": { | ||
| "application/json": { | ||
| "schema": { | ||
| "$ref": "#/components/schemas/CatalogsResponse" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "400": { | ||
| "description": "Bad request - invalid parameters or catalog_id not found", | ||
| "403": { | ||
| "description": "Forbidden - caller lacks access to the target account", | ||
| "content": { | ||
| "application/json": { | ||
| "schema": { | ||
| "$ref": "#/components/schemas/CatalogsErrorResponse" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "delete": { | ||
| "servers": [ | ||
| { | ||
| "url": "https://api.recoupable.com" | ||
| } | ||
| ], | ||
| "description": "Unlink catalogs from an account. If no other accounts are linked to a catalog after removal, the catalog is automatically deleted (cascading to catalog_songs). Otherwise, only the account-catalog relationship is removed.", | ||
| "requestBody": { | ||
| "description": "Array of catalog-account pairs to remove", | ||
| "required": true, | ||
| "content": { | ||
| "application/json": { | ||
| "schema": { | ||
| "$ref": "#/components/schemas/DeleteCatalogsRequest" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "responses": { | ||
| "200": { | ||
| "description": "Catalogs unlinked successfully", | ||
| }, | ||
| "404": { | ||
| "description": "Account not found", | ||
| "content": { | ||
| "application/json": { | ||
| "schema": { | ||
| "$ref": "#/components/schemas/CatalogsResponse" | ||
| "$ref": "#/components/schemas/CatalogsErrorResponse" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "400": { | ||
| "description": "Bad request - missing catalog_id or account_id", | ||
| "500": { | ||
| "description": "Internal server error", | ||
| "content": { | ||
| "application/json": { | ||
| "schema": { | ||
|
|
||
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,4 @@ | ||
| --- | ||
| title: Get Catalogs | ||
| openapi: get /api/catalogs | ||
| openapi: "/api-reference/openapi/releases.json GET /api/accounts/{id}/catalogs" | ||
| --- | ||
|
|
||
| <Note> | ||
| The Catalogs API also supports POST for creating/linking catalogs and DELETE for unlinking catalogs. See the [Create Catalogs](/api-reference/songs/catalogs-create) and [Delete Catalogs](/api-reference/songs/catalogs-delete) endpoints. | ||
| </Note> |
Uh oh!
There was an error while loading. Please reload this page.