Conversation
Signed-off-by: Philippe Martin <phmartin@redhat.com>
|
Warning Rate limit exceeded
⌛ 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. 📝 WalkthroughWalkthroughThe pull request updates the OpenAPI schema definitions in cli/openapi.yaml, renaming Agent-based schemas to Workspace-based schemas. It introduces new schema definitions for WorkspacePaths, Workspace, and WorkspacesList, updates the GET /list endpoint response reference, and adjusts example data accordingly. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
🚥 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. 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 (1)
cli/openapi.yaml (1)
30-61: Consider closing these object schemas.If
kortex-cli list -o jsonis meant to have a fixed shape, these schemas still allow undeclared keys by default. AddingadditionalProperties: falsetoWorkspacePaths,Workspace, andWorkspacesListmakes the contract enforce the structure you're documenting.Based on learnings, this spec defines CLI output schemas, so tightening the object shapes here directly strengthens the published CLI contract.♻️ Proposed diff
WorkspacePaths: type: object + additionalProperties: false properties: source: type: string configuration: type: string @@ Workspace: type: object + additionalProperties: false properties: id: type: string @@ WorkspacesList: type: object + additionalProperties: false properties: items: type: array🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@cli/openapi.yaml` around lines 30 - 61, The schemas WorkspacePaths, Workspace, and WorkspacesList currently allow undeclared keys; update each object schema (WorkspacePaths, Workspace, WorkspacesList) in cli/openapi.yaml to include additionalProperties: false directly under their type: object block so the OpenAPI contract for the CLI JSON output enforces only the declared properties and prevents extra keys.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@cli/openapi.yaml`:
- Line 23: The OpenAPI example has a mistyped key: the second example object
uses "i" instead of the required "id", causing the example to violate the
Workspace.required schema; locate the second example item in the examples block
and rename the "i" property to "id" so the example matches the documented JSON
shape and satisfies Workspace.required.
---
Nitpick comments:
In `@cli/openapi.yaml`:
- Around line 30-61: The schemas WorkspacePaths, Workspace, and WorkspacesList
currently allow undeclared keys; update each object schema (WorkspacePaths,
Workspace, WorkspacesList) in cli/openapi.yaml to include additionalProperties:
false directly under their type: object block so the OpenAPI contract for the
CLI JSON output enforces only the declared properties and prevents extra keys.
Signed-off-by: Philippe Martin <phmartin@redhat.com>
Define output for
kortex-cli list -o json