docs(docs): migrate GET /api/credits/get + GET /api/subscription/status#181
docs(docs): migrate GET /api/credits/get + GET /api/subscription/status#181arpitgupta1214 wants to merge 3 commits intomainfrom
Conversation
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>
|
Warning Rate limit exceeded
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 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 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. Review rate limit: 0/1 reviews remaining, refill in 15 minutes and 48 seconds.Comment |
There was a problem hiding this comment.
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.
| @@ -0,0 +1,166 @@ | |||
| { | |||
There was a problem hiding this comment.
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>
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>
Group 3 (Billing read) of the chat→api migration plan — documents the two account-scoped reads
usePaymentdepends on.Test plan
npx mintlify@latest devrenders the new Billing group with both pagesjqparsed cleanly)