Skip to content

New v2 API models (no usage yet)#2349

Merged
GelatoGenesis merged 1 commit into
mainfrom
b-17779659613
May 5, 2026
Merged

New v2 API models (no usage yet)#2349
GelatoGenesis merged 1 commit into
mainfrom
b-17779659613

Conversation

@GelatoGenesis
Copy link
Copy Markdown
Collaborator

@GelatoGenesis GelatoGenesis commented May 5, 2026

Summary by CodeRabbit

  • New Features

    • Added V2 API endpoints for drops, notifications, and waves with enhanced functionality including metadata retrieval, reaction/vote tracking, leaderboard access, and wave search capabilities.
  • Improvements

    • Increased maximum page size limit for bookmarked drops from 200 to 2,000 items per request.

Signed-off-by: GelatoGenesis <tarmokalling@gmail.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 5, 2026

📝 Walkthrough

Walkthrough

OpenAPI specification adds a comprehensive V2 API surface spanning drops, notifications, and waves domains. Includes 15+ new versioned endpoints with corresponding schemas, plus a minor constraint update allowing larger page sizes for an existing endpoint.

Changes

V2 API Surface (Drops, Notifications, Waves)

Layer / File(s) Summary
Constraint Update
openapi.yaml
GET /drops-bookmarked/ page_size maximum increased from 200 to 2000.
V2 Core Drop Models
openapi.yaml
Introduces ApiDropV2, ApiDropAndWave, ApiDropBoostV2 base models and pagination schemas (ApiDropV2Page, ApiDropV2PageWithoutCount, ApiDropsLeaderboardPageV2).
V2 Drop Reactions & Votes
openapi.yaml
Adds reaction/vote structures: ApiDropReactionV2, ApiDropReactionCounter, ApiDropVoteEditLog, ApiDropVoter, ApiDropVotersPage.
V2 Drop Metadata & Parts
openapi.yaml
Defines ApiDropMetadataResponse, ApiDropPartV2, ApiDropPartQuoteV2 with V2 identity resolution (ApiDropResolvedIdentityProfileV2).
V2 Drop Endpoints
openapi.yaml
Wires GET /v2/boosted-drops, /v2/drops/{id}, /v2/drops/{id}/metadata, /v2/drops/{id}/parts/{part_no}, /v2/drops/{id}/boosts, /v2/drops/{id}/reactions, /v2/drops/{id}/votes, /v2/drops/{id}/votes/logs to V2 drop schemas.
V2 Wave Models
openapi.yaml
Introduces ApiWaveOverview, ApiWaveOverviewPage, ApiWaveDecisionsPageV2, ApiWaveDecisionV2, ApiWaveDropsFeedV2, and ApiWavesV2ListType enum.
V2 Wave Endpoints
openapi.yaml
Wires GET /v2/waves, /v2/waves/{id}/drops, /v2/waves/{id}/curations/{curation_id}/drops, /v2/waves/{id}/decisions, /v2/waves/{id}/leaderboard, /v2/waves/{waveId}/search to V2 wave schemas.
V2 Notification Models
openapi.yaml
Adds ApiNotificationsResponseV2, ApiNotificationV2, ApiNotificationAdditionalContextV2, ApiNotificationDropReactedReactor.
V2 Notification Endpoint
openapi.yaml
Wires GET /v2/notifications to V2 notification response schema.
V2 Supporting Types
openapi.yaml
Introduces auxiliary schemas: ApiIdentityOverview, ApiIdentityOverviewBadges, ApiIdentityOverviewContextProfileContext, ApiMentionedWaveV2, ApiReplyToDropAuthor, ApiReplyToDropV2, ApiSubmissionDropContext.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 A rabbit's ode to versioning new,
With drops and waves and notifications too,
V2 endpoints bloom in spec so grand,
A thousand schemas across the land!
Reactions, votes, and waves align—
The API's future now will shine! 🌟

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: introducing new V2 API models in the OpenAPI schema with a note that they are not yet in use.
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 b-17779659613

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 5, 2026

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: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
openapi.yaml (1)

9795-9808: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Keep the V2 resolved-profile fields nullable.

The V1 contract allows metadata rows without a resolved profile and resolved profiles without a bio. Tightening both fields here will generate client types that reject existing payloads.

Proposed fix
     ApiDropMetadataV2:
       type: object
       required:
         - data_key
         - data_value
@@
         resolved_profile:
-          $ref: "#/components/schemas/ApiDropResolvedIdentityProfileV2"
+          anyOf:
+            - type: "null"
+            - $ref: "#/components/schemas/ApiDropResolvedIdentityProfileV2"

     ApiDropResolvedIdentityProfileV2:
       allOf:
         - $ref: "#/components/schemas/ApiIdentityOverview"
         - type: object
           properties:
             bio:
               type: string
+              nullable: true
             top_rep_categories:
               type: array
               items:
                 $ref: "#/components/schemas/ApiProfileRepCategorySummary"

Also applies to: 9973-9983

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@openapi.yaml` around lines 9795 - 9808, The ApiDropMetadataV2 schema
currently requires a non-null resolved_profile which tightens the contract;
update the ApiDropMetadataV2 definition to allow resolved_profile to be nullable
(add nullable: true or make it optional) and ensure the referenced
ApiDropResolvedIdentityProfileV2 schema keeps its bio field nullable (or not
required) so clients accept payloads without a profile or without a bio; apply
the same nullable change to the duplicate ApiDropMetadataV2 occurrence elsewhere
in the file (the other block referenced in the review).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@openapi.yaml`:
- Around line 2153-2197: The V2 endpoints getDropV2BoostsById and
getDropV2ReactionsById currently return unbounded arrays (items: ApiDropBoostV2
/ ApiDropReactionV2); reintroduce bounded pagination by adding standard query
parameters (e.g., page and page_size) to both operations and change the 200
response schema from a raw array to a paginated object (for example: { items:
array of ApiDropBoostV2 / ApiDropReactionV2, page: integer, page_size: integer,
total: integer }) so clients can incrementally load boosts and reactions while
keeping references to ApiDropBoostV2 and ApiDropReactionV2.
- Around line 6973-6978: The getWaveDropsV2 endpoint is inconsistent: the query
param drop_type uses ApiDropType (CHAT|PARTICIPATORY|WINNER) while the response
field ApiDropV2.drop_type is ApiDropMainType (CHAT|SUBMISSION); update the
contract so they match—either change the drop_type query parameter to reference
ApiDropMainType instead of ApiDropType, or widen ApiDropV2.drop_type to
ApiDropType; apply the same fix to the other occurrences mentioned (around the
other offsets) so all V2 endpoints and payloads consistently use the same enum
symbol (ApiDropMainType or ApiDropType) across getWaveDropsV2 and
ApiDropV2.drop_type.
- Around line 1999-2078: The /v2/boosted-drops response currently returns
ApiDropV2Page whose ApiDropV2 items lack their owning wave; fix by returning
wave context: either add a "wave" property to the ApiDropV2 schema (and update
ApiDropV2Page items to include it) or change the page item type to a compound
type (e.g., ApiDropAndWave) and update the /v2/boosted-drops get response $ref
to the new ApiDropAndWave page schema; ensure the chosen schema is used
consistently wherever ApiDropV2Page is returned for boosted-drop feeds
(including the same endpoints referenced in the review) so consumers can
group/render cross-wave boosted feeds.

---

Outside diff comments:
In `@openapi.yaml`:
- Around line 9795-9808: The ApiDropMetadataV2 schema currently requires a
non-null resolved_profile which tightens the contract; update the
ApiDropMetadataV2 definition to allow resolved_profile to be nullable (add
nullable: true or make it optional) and ensure the referenced
ApiDropResolvedIdentityProfileV2 schema keeps its bio field nullable (or not
required) so clients accept payloads without a profile or without a bio; apply
the same nullable change to the duplicate ApiDropMetadataV2 occurrence elsewhere
in the file (the other block referenced in the review).
🪄 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: 3422f56b-5161-4a74-ae04-d3e099b7753b

📥 Commits

Reviewing files that changed from the base of the PR and between 3c5b1a0 and 836cc81.

⛔ Files ignored due to path filters (40)
  • generated/models/ApiDropAndWave.ts is excluded by !**/generated/**
  • generated/models/ApiDropBoostV2.ts is excluded by !**/generated/**
  • generated/models/ApiDropMainType.ts is excluded by !**/generated/**
  • generated/models/ApiDropMetadataV2.ts is excluded by !**/generated/**
  • generated/models/ApiDropPartQuoteV2.ts is excluded by !**/generated/**
  • generated/models/ApiDropPartV2.ts is excluded by !**/generated/**
  • generated/models/ApiDropReactionCounter.ts is excluded by !**/generated/**
  • generated/models/ApiDropReactionV2.ts is excluded by !**/generated/**
  • generated/models/ApiDropResolvedIdentityProfileV2.ts is excluded by !**/generated/**
  • generated/models/ApiDropV2.ts is excluded by !**/generated/**
  • generated/models/ApiDropV2ContextProfileContext.ts is excluded by !**/generated/**
  • generated/models/ApiDropV2Page.ts is excluded by !**/generated/**
  • generated/models/ApiDropV2PageWithoutCount.ts is excluded by !**/generated/**
  • generated/models/ApiDropVoteEditLog.ts is excluded by !**/generated/**
  • generated/models/ApiDropVoter.ts is excluded by !**/generated/**
  • generated/models/ApiDropVotersPage.ts is excluded by !**/generated/**
  • generated/models/ApiDropsLeaderboardPageV2.ts is excluded by !**/generated/**
  • generated/models/ApiIdentityOverview.ts is excluded by !**/generated/**
  • generated/models/ApiIdentityOverviewBadges.ts is excluded by !**/generated/**
  • generated/models/ApiIdentityOverviewContextProfileContext.ts is excluded by !**/generated/**
  • generated/models/ApiMentionedWaveV2.ts is excluded by !**/generated/**
  • generated/models/ApiNotificationAdditionalContextV2.ts is excluded by !**/generated/**
  • generated/models/ApiNotificationDropReactedReactor.ts is excluded by !**/generated/**
  • generated/models/ApiNotificationV2.ts is excluded by !**/generated/**
  • generated/models/ApiNotificationsResponseV2.ts is excluded by !**/generated/**
  • generated/models/ApiReplyToDropAuthor.ts is excluded by !**/generated/**
  • generated/models/ApiReplyToDropV2.ts is excluded by !**/generated/**
  • generated/models/ApiSubmissionDropContext.ts is excluded by !**/generated/**
  • generated/models/ApiSubmissionDropStatus.ts is excluded by !**/generated/**
  • generated/models/ApiSubmissionDropVoting.ts is excluded by !**/generated/**
  • generated/models/ApiSubmissionDropVotingContextProfileContext.ts is excluded by !**/generated/**
  • generated/models/ApiWaveDecisionV2.ts is excluded by !**/generated/**
  • generated/models/ApiWaveDecisionWinnerV2.ts is excluded by !**/generated/**
  • generated/models/ApiWaveDecisionsPageV2.ts is excluded by !**/generated/**
  • generated/models/ApiWaveDropsFeedV2.ts is excluded by !**/generated/**
  • generated/models/ApiWaveOverview.ts is excluded by !**/generated/**
  • generated/models/ApiWaveOverviewContextProfileContext.ts is excluded by !**/generated/**
  • generated/models/ApiWaveOverviewPage.ts is excluded by !**/generated/**
  • generated/models/ApiWavesV2ListType.ts is excluded by !**/generated/**
  • generated/models/ObjectSerializer.ts is excluded by !**/generated/**
📒 Files selected for processing (1)
  • openapi.yaml

Comment thread openapi.yaml
Comment thread openapi.yaml
Comment thread openapi.yaml
@GelatoGenesis GelatoGenesis merged commit cf824a9 into main May 5, 2026
8 checks passed
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