Skip to content

docs(docs): remove GET /api/subscriptions endpoint#159

Merged
sweetmantech merged 1 commit into
mainfrom
migrate/get-accounts-id-subscription
Apr 24, 2026
Merged

docs(docs): remove GET /api/subscriptions endpoint#159
sweetmantech merged 1 commit into
mainfrom
migrate/get-accounts-id-subscription

Conversation

@arpitgupta1214
Copy link
Copy Markdown
Collaborator

@arpitgupta1214 arpitgupta1214 commented Apr 23, 2026

Summary

Removes the GET /api/subscriptions endpoint from the public API docs — no monorepo caller uses it and the api-side replacement is being dropped (recoupable/api#476 closed).

Test plan

  • Mintlify preview renders without the Subscriptions > Get page
  • Subscriptions nav group still shows sessions-create
  • accounts.json validates

Summary by CodeRabbit

  • API Changes

    • Removed the public GET /api/subscriptions endpoint and its documented responses.
  • Documentation

    • Removed the subscriptions endpoint page and navigation entry from the Accounts → Subscriptions section.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 23, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b7906244-40b1-438b-b1ca-b16e03d46bd5

📥 Commits

Reviewing files that changed from the base of the PR and between d4d94e9 and 0dd00c2.

📒 Files selected for processing (3)
  • api-reference/openapi/accounts.json
  • api-reference/subscriptions/get.mdx
  • docs.json
💤 Files with no reviewable changes (3)
  • api-reference/subscriptions/get.mdx
  • docs.json
  • api-reference/openapi/accounts.json

📝 Walkthrough

Walkthrough

The OpenAPI spec and docs remove the GET /api/subscriptions operation and its associated component schemas; the documentation page frontmatter linking that operation and the docs navigation entry for the page are also removed.

Changes

Cohort / File(s) Summary
API specification
api-reference/openapi/accounts.json
Deleted GET /api/subscriptions operation and removed related component schemas: SubscriptionResponse, EnterpriseSubscriptionResponse, StripeSubscription, and SubscriptionErrorResponse.
Endpoint docs
api-reference/subscriptions/get.mdx
Removed frontmatter that referenced the GET /api/subscriptions OpenAPI operation (page no longer tied to that route).
Docs navigation
docs.json
Removed the api-reference/subscriptions/get entry from the Accounts → Subscriptions group in navigation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • sweetmantech

Poem

🐰 I dug a little doc hole deep and neat,
One subscriptions path I chose to delete.
Schemas hopped away, the page went too,
Quiet fields now breathe fresh dew.
🥕✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title says 'remove GET /api/subscriptions' but the actual objectives show this is a migration that replaces the old endpoint with a new one at /api/accounts/{id}/subscription, not just removal. Update the title to reflect the actual change: 'docs: migrate GET /api/subscriptions to /api/accounts/{id}/subscription' to accurately represent the endpoint migration rather than just removal.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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 migrate/get-accounts-id-subscription

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

@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: 1

🧹 Nitpick comments (1)
api-reference/openapi/accounts.json (1)

357-450: LGTM — migration is clean and consistent.

The new /api/accounts/{id}/subscription operation correctly:

  • Uses a required UUID path param id with matching schema conventions (mirrors /api/accounts/{id} at lines 17–55).
  • Drops the per-operation servers override so the root https://recoup-api.vercel.app server is inherited.
  • Documents operation-level apiKeyAuth and bearerAuth consistent with other authenticated endpoints in this file.
  • Enumerates 200/400/401/403/404/500 with SubscriptionErrorResponse refs that resolve to the schema at line 2833.

Minor nit (optional): the 400 description at line 399 says "invalid or missing id path parameter format". Since id is a required path parameter, a "missing" id cannot reach the handler (it would be a 404 routing mismatch). Consider simplifying to just "invalid id UUID format".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@api-reference/openapi/accounts.json` around lines 357 - 450, Update the 400
response description for the GET operation on "/api/accounts/{id}/subscription":
remove the phrase about a "missing" id since the path param is required and
missing id would not reach the handler; change the description to something like
"Bad request - invalid `id` UUID format" in the 400 response block for that
operation to reflect the correct validation case.
🤖 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/subscriptions/get.mdx`:
- Around line 2-3: The page title "Get Subscriptions" is plural but the
operation is account-scoped; update the frontmatter title value (the title: 'Get
Subscriptions' string) to a singular, self-describing title such as "Get
Subscription" or "Get Account Subscription" so the sidebar and search reflect
the single-resource endpoint for GET /api/accounts/{id}/subscription.

---

Nitpick comments:
In `@api-reference/openapi/accounts.json`:
- Around line 357-450: Update the 400 response description for the GET operation
on "/api/accounts/{id}/subscription": remove the phrase about a "missing" id
since the path param is required and missing id would not reach the handler;
change the description to something like "Bad request - invalid `id` UUID
format" in the 400 response block for that operation to reflect the correct
validation case.
🪄 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: ede0651b-0874-41dd-a723-ec4d39f9e043

📥 Commits

Reviewing files that changed from the base of the PR and between 2ec9d82 and d4d94e9.

📒 Files selected for processing (2)
  • api-reference/openapi/accounts.json
  • api-reference/subscriptions/get.mdx

Comment thread api-reference/subscriptions/get.mdx 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.

No issues found across 2 files

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/accounts.json">

<violation number="1" location="api-reference/openapi/accounts.json:364">
P2: `GET /api/accounts/{id}/subscription` is missing operation-level auth requirements, so the OpenAPI contract now marks it as unauthenticated.</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/accounts.json Outdated
"in": "query",
"name": "id",
"in": "path",
"description": "The unique identifier of the account to query",
Copy link
Copy Markdown

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

Choose a reason for hiding this comment

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

P2: GET /api/accounts/{id}/subscription is missing operation-level auth requirements, so the OpenAPI contract now marks it as unauthenticated.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At api-reference/openapi/accounts.json, line 364:

<comment>`GET /api/accounts/{id}/subscription` is missing operation-level auth requirements, so the OpenAPI contract now marks it as unauthenticated.</comment>

<file context>
@@ -357,19 +357,11 @@
             "name": "id",
             "in": "path",
-            "description": "The unique identifier (UUID) of the account to query",
+            "description": "The unique identifier of the account to query",
             "required": true,
             "schema": {
</file context>
Fix with Cubic

No monorepo caller hits this endpoint — chat's dead helper is being deleted
(recoupable/chat#1703) and the replacement api route is dropped. Removing
the path, mdx, nav entry, and orphaned response schemas.
@arpitgupta1214 arpitgupta1214 force-pushed the migrate/get-accounts-id-subscription branch from e76ad2c to 0dd00c2 Compare April 23, 2026 23:08
@arpitgupta1214 arpitgupta1214 changed the title docs(docs): migrate GET /api/subscriptions to /api/accounts/{id}/subscription docs(docs): remove GET /api/subscriptions endpoint Apr 23, 2026
@sweetmantech sweetmantech merged commit 82d3a5d into main Apr 24, 2026
2 checks passed
@sweetmantech sweetmantech deleted the migrate/get-accounts-id-subscription branch April 24, 2026 17:49
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