Conversation
…2-open-operations#896 - Rename all *At timestamp fields to *On in response schemas (createdOn, updatedOn, closedOn) across Case, CaseView, CaseSearchView, User, Account, Project, Deployment, Product, ProductVersion, DeployedProduct, and CaseComment — matches the *On convention standardized in entity PR wso2-open-operations#896 - Add workState to UpdateCaseRequest (oneOf + properties) so callers can set work sub-state via PATCH /cases/{id} - Add workState and closedOn to CaseView - Add workState, closedOn, product, assignedEngineer, parentCase, relatedCase, and account to CaseSearchView - Add AssignedEngineerRef, CaseNumberRef, AccountRef component schemas - Update PATCH /cases/{id} description to mention workState Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Warning Review limit reached
More reviews will be available in 52 minutes and 23 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe ChangesOpenAPI Contract Updates
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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: 1
🧹 Nitpick comments (2)
apps/csm-portal/backend/openapi.yaml (2)
2147-2175: 💤 Low valueConsider adding
format: uuidto id fields for consistency.Other reference schemas in this spec (e.g.,
UserRef.idat line 1407,UserIDEmailRef.idat line 1420) specifyformat: uuidfor their id properties. The new schemasAssignedEngineerRef,CaseNumberRef, andAccountRefomit this format specification.If the entity-service returns UUIDs for these ids, adding
format: uuidwould improve consistency and enable better client-side validation.🤖 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 `@apps/csm-portal/backend/openapi.yaml` around lines 2147 - 2175, The id properties in the AssignedEngineerRef, CaseNumberRef, and AccountRef schemas are missing the format specification for consistency with other reference schemas in the spec (such as UserRef and UserIDEmailRef). Add format: uuid to the id property definition in each of these three schemas to ensure consistent formatting and enable better client-side validation if the entity-service returns UUIDs for these ids.
1591-1604: 💤 Low value
nullable: truealongside$refis ignored in OpenAPI 3.0.x.In OpenAPI 3.0.x,
$refreplaces all sibling keywords, so thenullable: trueon lines 1594, 1597, 1600, 1603 is ignored. The nullability is preserved only because the referenced schemas (AssignedEngineerRef,CaseNumberRef,AccountRef) definenullable: truethemselves.For clarity and tooling compatibility, either:
- Remove the redundant
nullable: truefrom these properties (relying on the schema definitions), or- Use the
allOfpattern to combine nullability with the reference:assignedEngineer: nullable: true allOf: - $ref: '`#/components/schemas/AssignedEngineerRef`'🤖 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 `@apps/csm-portal/backend/openapi.yaml` around lines 1591 - 1604, The `nullable: true` keywords alongside `$ref` in the openapi.yaml file for the properties assignedEngineer, parentCase, relatedCase, and account are being ignored in OpenAPI 3.0.x because `$ref` replaces all sibling keywords. To fix this, either remove the redundant `nullable: true` statements from these four properties (since nullability is already defined in their referenced schemas AssignedEngineerRef, CaseNumberRef, and AccountRef), or restructure each affected property using the `allOf` pattern where you place the `nullable: true` and `$ref` at the appropriate nesting levels instead of as siblings.
🤖 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 `@apps/csm-portal/backend/openapi.yaml`:
- Around line 1485-1502: The CaseView schema in openapi.yaml is missing
reference property definitions that the frontend BeCaseView type expects and
that the entity-service contract provides. Add the missing reference properties
(assignedEngineer, account, product, parentCase, and relatedCase) to the
CaseView schema definition by following the same structure and format used in
the CaseSearchView schema (lines 1591-1604). These properties should be added to
the CaseView schema to ensure accurate API documentation and align with what
consumers expect to receive from this endpoint.
---
Nitpick comments:
In `@apps/csm-portal/backend/openapi.yaml`:
- Around line 2147-2175: The id properties in the AssignedEngineerRef,
CaseNumberRef, and AccountRef schemas are missing the format specification for
consistency with other reference schemas in the spec (such as UserRef and
UserIDEmailRef). Add format: uuid to the id property definition in each of these
three schemas to ensure consistent formatting and enable better client-side
validation if the entity-service returns UUIDs for these ids.
- Around line 1591-1604: The `nullable: true` keywords alongside `$ref` in the
openapi.yaml file for the properties assignedEngineer, parentCase, relatedCase,
and account are being ignored in OpenAPI 3.0.x because `$ref` replaces all
sibling keywords. To fix this, either remove the redundant `nullable: true`
statements from these four properties (since nullability is already defined in
their referenced schemas AssignedEngineerRef, CaseNumberRef, and AccountRef), or
restructure each affected property using the `allOf` pattern where you place the
`nullable: true` and `$ref` at the appropriate nesting levels instead of as
siblings.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: fae54997-497b-4d1f-abc1-1cb83283c431
📒 Files selected for processing (1)
apps/csm-portal/backend/openapi.yaml
…-open-operations#897 - Add missing ref properties (product, assignedEngineer, parentCase, relatedCase, account) to CaseView schema — entity service CaseView returns these same fields - Remove redundant nullable: true siblings next to $ref in CaseSearchView; nullability is already declared on the referenced schemas, and OAS 3.0 ignores sibling keywords alongside $ref - Add format: uuid to id fields in AssignedEngineerRef, CaseNumberRef, and AccountRef for consistency with other ref schemas in this spec Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…-open-operations#897 - Add missing ref properties (product, assignedEngineer, parentCase, relatedCase, account) to CaseView schema — entity service CaseView returns these same fields - Remove redundant nullable: true siblings next to $ref in CaseSearchView; nullability is already declared on the referenced schemas, and OAS 3.0 ignores sibling keywords alongside $ref - Add format: uuid to id fields in AssignedEngineerRef, CaseNumberRef, and AccountRef for consistency with other ref schemas in this spec Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
*At→*On): updatedcreatedOn,updatedOn,closedOnacross all response schemas —Case,CaseView,CaseSearchView,User,Account,Project,Deployment,Product,ProductVersion,DeployedProduct, andCaseComment. Matches the*Onconvention standardized in entity service PR [Customer Entity] Extend case endpoints with workState update, full response field parity, and *On timestamp convention #896.workStatein PATCH: addedworkStatetoUpdateCaseRequest(oneOf+properties) so callers can set the work sub-state viaPATCH /cases/{id}.CaseViewadditions:workStateandclosedOnfields added (entity service now returns both).CaseSearchViewadditions:workState,closedOn,product,assignedEngineer,parentCase,relatedCase, andaccount(new fields returned by entity serviceSearchCaseView).AssignedEngineerRef,CaseNumberRef,AccountRef(needed byCaseSearchViewrefs).No Go handler code changes required — the portal is a passthrough BFF and doesn't parse any of these timestamp or new reference fields.
Depends on entity service PR #896 being merged first.
Test plan
npx @apidevtools/swagger-cli validate openapi.yamlpasses ✅go test ./...passes ✅GET /cases/{id}response includesworkState,createdOn,updatedOn,closedOnPOST /cases/searchresponse items includeworkState,closedOn, and new ref fieldsPATCH /cases/{id}with{"workState": "paused"}is accepted🤖 Generated with Claude Code
Summary by CodeRabbit