Skip to content

docs(docs): migrate GET /api/credits/get + GET /api/subscription/status#181

Open
arpitgupta1214 wants to merge 3 commits intomainfrom
migrate/billing-group3
Open

docs(docs): migrate GET /api/credits/get + GET /api/subscription/status#181
arpitgupta1214 wants to merge 3 commits intomainfrom
migrate/billing-group3

Conversation

@arpitgupta1214
Copy link
Copy Markdown
Collaborator

Group 3 (Billing read) of the chat→api migration plan — documents the two account-scoped reads usePayment depends on.

Test plan

  • npx mintlify@latest dev renders the new Billing group with both pages
  • OpenAPI specs validate (jq parsed cleanly)

Group 3 (Billing read) of the chat→api migration plan. Documents the
two account-scoped read endpoints chat's usePayment hook depends on.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 1, 2026

Warning

Rate limit exceeded

@arpitgupta1214 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 15 minutes and 48 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c39c7ce4-29af-4246-a53c-7290d9974e88

📥 Commits

Reviewing files that changed from the base of the PR and between 200bf15 and 15931c9.

📒 Files selected for processing (4)
  • api-reference/billing/credits.mdx
  • api-reference/billing/subscription-status.mdx
  • api-reference/openapi/billing.json
  • docs.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch migrate/billing-group3

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
Review rate limit: 0/1 reviews remaining, refill in 15 minutes and 48 seconds.

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.

3 issues found across 4 files

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

<violation number="1" location="api-reference/openapi/billing.json:1">
P3: Custom agent: **Enforce Clear Code Style and Maintainability Practices**

New file exceeds the 100-line file limit required by Rule 2.</violation>

<violation number="2" location="api-reference/openapi/billing.json:19">
P1: `GET /api/credits/get` is documented as account-scoped but unauthenticated, which exposes billing data via `accountId` enumeration.</violation>

<violation number="3" location="api-reference/openapi/billing.json:57">
P1: `GET /api/subscription/status` is documented as unauthenticated while accepting `accountId`, enabling unauthorized subscription-status lookups.</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/billing.json Outdated
Comment thread api-reference/openapi/billing.json Outdated
@@ -0,0 +1,166 @@
{
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3: Custom agent: Enforce Clear Code Style and Maintainability Practices

New file exceeds the 100-line file limit required by Rule 2.

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

<comment>New file exceeds the 100-line file limit required by Rule 2.</comment>

<file context>
@@ -0,0 +1,166 @@
+{
+  "openapi": "3.1.0",
+  "info": {
</file context>

arpitgupta1214 and others added 2 commits May 1, 2026 19:43
Renames the documented paths to follow api repo conventions and
documents the auth requirement (apiKey or bearer):

- /api/credits/get → /api/credits
- /api/subscription/status → /api/subscriptions/status

Adds securitySchemes (bearerAuth + apiKeyAuth) and 401/500 response
shapes; drops the `accountId` query parameter — the api now derives the
account from the auth context.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant