Skip to content

feat: list content#9

Merged
feloy merged 2 commits intoopenkaiden:mainfrom
feloy:init-more
Mar 9, 2026
Merged

feat: list content#9
feloy merged 2 commits intoopenkaiden:mainfrom
feloy:init-more

Conversation

@feloy
Copy link
Copy Markdown
Contributor

@feloy feloy commented Mar 9, 2026

Define output for kortex-cli list -o json

{
  "items": [
    {
      "id": "...",
      "name": "...",
      "paths": {
        "source": "...",
        "configuration": "..."
      }
    }
  ]
}

Signed-off-by: Philippe Martin <phmartin@redhat.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 9, 2026

Warning

Rate limit exceeded

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

⌛ 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 97d018cc-8b81-4730-bd57-de793774a12d

📥 Commits

Reviewing files that changed from the base of the PR and between 1967c60 and 55301e2.

📒 Files selected for processing (1)
  • cli/openapi.yaml
📝 Walkthrough

Walkthrough

The 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

Cohort / File(s) Summary
OpenAPI Schema Update
cli/openapi.yaml
Replaced Agent/AgentsList schemas with Workspace/WorkspacesList. Introduced new WorkspacePaths schema with source and configuration properties, and new Workspace schema with id, name, and paths fields. Updated GET /list response reference and example data structure to align with new schema definitions.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'feat: list content' is vague and generic, using non-descriptive terminology that doesn't convey the specific nature of the change (updating API schema from Agents to Workspaces). Use a more descriptive title like 'feat: update list response schema to use Workspaces instead of Agents' to clearly indicate the main API change.
✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed The description is directly related to the changeset, providing the specific JSON output format for the list command which aligns with the schema changes in the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@feloy feloy requested review from MarsKubeX, benoitf and jeffmaury March 9, 2026 09:29
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: 1

🧹 Nitpick comments (1)
cli/openapi.yaml (1)

30-61: Consider closing these object schemas.

If kortex-cli list -o json is meant to have a fixed shape, these schemas still allow undeclared keys by default. Adding additionalProperties: false to WorkspacePaths, Workspace, and WorkspacesList makes the contract enforce the structure you're documenting.

♻️ 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
Based on learnings, this spec defines CLI output schemas, so tightening the object shapes here directly strengthens the published CLI contract.
🤖 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.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fb1e5515-90b4-4318-99a0-b988e97d7dbf

📥 Commits

Reviewing files that changed from the base of the PR and between f2052d8 and 1967c60.

📒 Files selected for processing (1)
  • cli/openapi.yaml

Signed-off-by: Philippe Martin <phmartin@redhat.com>
@feloy feloy merged commit 10653d0 into openkaiden:main Mar 9, 2026
3 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.

3 participants