feat: add predictions API documentation#126
Conversation
Define OpenAPI spec for POST/GET /api/predictions endpoints with engagement scoring, timeline, peak moments, weak spots, and regional brain activation data. Docs-driven development — contract defined before implementation. Made-with: Cursor
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 28 minutes and 57 seconds. ⌛ 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 (5)
✨ 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. Comment |
There was a problem hiding this comment.
1 issue found across 5 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/predictions.json">
<violation number="1" location="api-reference/openapi/predictions.json:192">
P1: Custom agent: **Flag AI Slop and Fabricated Changes**
`securitySchemes` are defined but never applied — every sibling spec (content.json, accounts.json, etc.) attaches `"security": [{"apiKeyAuth": []}, {"bearerAuth": []}]` at the operation level, but all three operations here omit it. Mintlify won't render auth requirements, contradicting the documented 401 responses. Add a `security` array to each operation (POST, GET list, GET by ID).</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.
| }, | ||
| "components": { | ||
| "securitySchemes": { | ||
| "apiKeyAuth": { |
There was a problem hiding this comment.
P1: Custom agent: Flag AI Slop and Fabricated Changes
securitySchemes are defined but never applied — every sibling spec (content.json, accounts.json, etc.) attaches "security": [{"apiKeyAuth": []}, {"bearerAuth": []}] at the operation level, but all three operations here omit it. Mintlify won't render auth requirements, contradicting the documented 401 responses. Add a security array to each operation (POST, GET list, GET by ID).
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At api-reference/openapi/predictions.json, line 192:
<comment>`securitySchemes` are defined but never applied — every sibling spec (content.json, accounts.json, etc.) attaches `"security": [{"apiKeyAuth": []}, {"bearerAuth": []}]` at the operation level, but all three operations here omit it. Mintlify won't render auth requirements, contradicting the documented 401 responses. Add a `security` array to each operation (POST, GET list, GET by ID).</comment>
<file context>
@@ -0,0 +1,412 @@
+ },
+ "components": {
+ "securitySchemes": {
+ "apiKeyAuth": {
+ "type": "apiKey",
+ "in": "header",
</file context>
Summary
Context
Docs-driven development: this spec defines the contract for the neural engagement prediction API before implementation.
Test plan
npx mintlify@latest devMade with Cursor
Summary by cubic
Add OpenAPI 3.1 docs and pages for the Predictions API (create, list, get) to define the contract for neural engagement scoring and retrieval. Adds a new Predictions group to the docs navigation.
api-reference/openapi/predictions.jsoncovering POST/api/predictions, GET/api/predictions, and GET/api/predictions/{id}withengagement_score,engagement_timeline,peak_moments,weak_spots,regional_activation, and pagination.api-reference/predictions/create,.../list, and.../get, each linked to the spec.docs.jsonto include a “Predictions” group under the Content tab.Written for commit 9bdb974. Summary will update on new commits.