Wave schema update#2168
Conversation
Signed-off-by: GelatoGenesis <tarmokalling@gmail.com>
📝 WalkthroughWalkthroughOpenAPI schema updates adding wave participation submission strategy configurations with related enums, introducing Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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.
Actionable comments posted: 2
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)
10888-11005:⚠️ Potential issue | 🟡 Minor
no_of_applications_allowed_per_participantcan't be both required and "omittable".
ApiUpdateWaveParticipationConfigmarks this field as required, so generated clients treat it as mandatory, but the description says omission means "Infinite". Ifnullis the real sentinel, please say that; otherwise the field should not be inrequired.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@openapi.yaml` around lines 10888 - 11005, The schema ApiUpdateWaveParticipationConfig currently lists no_of_applications_allowed_per_participant in the required array but its description says omission is allowed ("Infinite"), causing client generation mismatch; either remove no_of_applications_allowed_per_participant from the required list (so it truly can be omitted) or, if null is the intended sentinel, keep it required but add nullable: true and update the description to explicitly state "use null to mean infinite"; update the ApiUpdateWaveParticipationConfig schema accordingly and ensure the change is applied to the no_of_applications_allowed_per_participant property entry.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@openapi.yaml`:
- Around line 11028-11034: The docs and SDK disagree about submission_strategy
mutation: either treat submission_strategy as immutable (must match stored
value) or allow explicit null to clear it; pick one and make OpenAPI and the
generated model consistent. If immutable: remove the "Set explicitly to null to
clear it." sentence, delete the "null" anyOf branch and ensure
ApiUpdateWaveParticipationConfig.ts makes submission_strategy non-nullable and
documented as immutable. If nullable/clearable: keep the null anyOf branch and
update the enclosing update request description to allow updates and clearing,
and ensure ApiUpdateWaveParticipationConfig.ts keeps submission_strategy?:
ApiWaveParticipationSubmissionStrategy | null with matching docs. Also apply the
same change to the other occurrence (the second submission_strategy block).
- Around line 8282-8284: The generated ApiDropMetadataResponse model is
incorrectly referencing ApiDropMetadata.attributeTypeMap in its
getAttributeTypeMap(), causing runtime symbol issues; update the OpenAPI
generator template or the schema so that the generated file
generated/models/ApiDropMetadataResponse.ts defines its own static
attributeTypeMap and that getAttributeTypeMap() returns
ApiDropMetadataResponse.attributeTypeMap (not ApiDropMetadata.attributeTypeMap).
Locate the template that emits getAttributeTypeMap() (or the codegen logic that
inlines $ref types) and change it to use the current model/class name symbol
(ApiDropMetadataResponse) when emitting attribute maps, or alternatively adjust
the OpenAPI component name to be unique so the generator emits a distinct
ApiDropMetadataResponse attributeTypeMap for all places where
ApiDropMetadataResponse is referenced.
---
Outside diff comments:
In `@openapi.yaml`:
- Around line 10888-11005: The schema ApiUpdateWaveParticipationConfig currently
lists no_of_applications_allowed_per_participant in the required array but its
description says omission is allowed ("Infinite"), causing client generation
mismatch; either remove no_of_applications_allowed_per_participant from the
required list (so it truly can be omitted) or, if null is the intended sentinel,
keep it required but add nullable: true and update the description to explicitly
state "use null to mean infinite"; update the ApiUpdateWaveParticipationConfig
schema accordingly and ensure the change is applied to the
no_of_applications_allowed_per_participant property entry.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 0e20be6b-d3b0-49b6-82d6-8ccd5edaae8f
⛔ Files ignored due to path filters (16)
generated/models/ApiCreateNewWaveParticipationConfig.tsis excluded by!**/generated/**generated/models/ApiDrop.tsis excluded by!**/generated/**generated/models/ApiDropMetadataResponse.tsis excluded by!**/generated/**generated/models/ApiDropWithoutWave.tsis excluded by!**/generated/**generated/models/ApiMemesMintStat.tsis excluded by!**/generated/**generated/models/ApiMemesMintStatsTotals.tsis excluded by!**/generated/**generated/models/ApiMemesMintStatsYearly.tsis excluded by!**/generated/**generated/models/ApiUpdateWaveParticipationConfig.tsis excluded by!**/generated/**generated/models/ApiUpdateWaveRequest.tsis excluded by!**/generated/**generated/models/ApiWaveParticipationConfig.tsis excluded by!**/generated/**generated/models/ApiWaveParticipationIdentitySubmissionAllowDuplicates.tsis excluded by!**/generated/**generated/models/ApiWaveParticipationIdentitySubmissionWhoCanBeSubmitted.tsis excluded by!**/generated/**generated/models/ApiWaveParticipationSubmissionStrategy.tsis excluded by!**/generated/**generated/models/ApiWaveParticipationSubmissionStrategyIdentityConf.tsis excluded by!**/generated/**generated/models/ApiWaveParticipationSubmissionStrategyType.tsis excluded by!**/generated/**generated/models/ObjectSerializer.tsis excluded by!**/generated/**
📒 Files selected for processing (1)
openapi.yaml



Summary by CodeRabbit