Skip to content

feat: add predictions API documentation#126

Open
sidneyswift wants to merge 1 commit intomainfrom
feature/predictions-endpoints
Open

feat: add predictions API documentation#126
sidneyswift wants to merge 1 commit intomainfrom
feature/predictions-endpoints

Conversation

@sidneyswift
Copy link
Copy Markdown
Contributor

@sidneyswift sidneyswift commented Apr 10, 2026

Summary

  • OpenAPI 3.1.0 spec for predictions endpoints (POST create, GET list, GET by ID)
  • 3 MDX pages (create, list, get) with frontmatter linking to the OpenAPI spec
  • Updated docs.json navigation to include Predictions group under Content tab

Context

Docs-driven development: this spec defines the contract for the neural engagement prediction API before implementation.

Test plan

  • Verify Mintlify renders all 3 pages correctly via npx mintlify@latest dev
  • Confirm request/response schemas match implementation

Made 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.

  • New Features
    • Added api-reference/openapi/predictions.json covering POST /api/predictions, GET /api/predictions, and GET /api/predictions/{id} with engagement_score, engagement_timeline, peak_moments, weak_spots, regional_activation, and pagination.
    • Added MDX pages: api-reference/predictions/create, .../list, and .../get, each linked to the spec.
    • Updated docs.json to include a “Predictions” group under the Content tab.

Written for commit 9bdb974. Summary will update on new commits.

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
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 10, 2026

Warning

Rate limit exceeded

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

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 @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: 8a3e61be-d6c7-4042-9ad8-58cb74b43176

📥 Commits

Reviewing files that changed from the base of the PR and between d3db7d6 and 9bdb974.

📒 Files selected for processing (5)
  • api-reference/openapi/predictions.json
  • api-reference/predictions/create.mdx
  • api-reference/predictions/get.mdx
  • api-reference/predictions/list.mdx
  • docs.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/predictions-endpoints

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

@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 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": {
Copy link
Copy Markdown

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

Choose a reason for hiding this comment

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

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>
Fix with Cubic

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