-
Notifications
You must be signed in to change notification settings - Fork 1
Regenerate openapi client #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Adds new fields to execution log details and execution log list
WalkthroughThe OpenAPI specification was updated to refine execution log tracking and introduce a new judge invitation endpoint. Enhancements include new and modified schemas for execution logs, expanded execution type values, a new filter parameter, and a dedicated endpoint for inviting users to judges via email, with corresponding schema definitions. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant API
participant EmailService
Client->>API: POST /v1/judges/{id}/invite/ (emails, judge_url)
API->>EmailService: Send invitations to provided emails
EmailService-->>API: Confirmation of sent emails
API-->>Client: Success or error response
sequenceDiagram
participant Client
participant API
participant DB
Client->>API: GET /v1/execution-logs/?executed_item_id&execution_type
API->>DB: Query logs filtered by executed_item_id and execution_type
DB-->>API: Return filtered execution logs
API-->>Client: Return execution log list with new fields
Poem
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this 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
🧹 Nitpick comments (4)
openapi.yaml (4)
807-815
: Align enum and description order forexecution_type
.The enum entries and the bullet list in the description are out of sync. Reorder both to match, for example:
enum: - evaluator - experiment - judge - skill description: |- * `evaluator` – evaluator * `experiment` – experiment * `judge` – judge * `skill` – skill
2505-2525
: Add descriptions for new log-detail properties.The
executed_item_id
,executed_item_name
,executed_item_version_id
, andexecution_type
properties lackdescription
fields. Document each for clarity:executed_item_id: type: string format: uuid readOnly: true nullable: true description: UUID of the item (skill, evaluator, judge, experiment) that was executed. executed_item_name: type: string readOnly: true description: Name of the executed item. executed_item_version_id: type: string format: uuid readOnly: true nullable: true description: Version ID of the executed item, if applicable. execution_type: type: string readOnly: true description: Type of execution performed.
2549-2552
: Document theprompt_template
field.The
prompt_template
property needs adescription
to explain its purpose:prompt_template: type: string readOnly: true description: Template used to generate the execution prompt.
2931-2950
: Provide an example forJudgeInviteRequest
.Including a usage example will help client implementers:
JudgeInviteRequest: type: object properties: ... required: - emails - judge_url example: emails: - "alice@example.com" - "bob@example.com" judge_url: "https://app.rootsignals.ai/judges/123e4567-e89b-12d3-a456-426614174000"
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (20)
src/root/generated/openapi_aclient/api/execution_logs_api.py
is excluded by!**/generated/**
src/root/generated/openapi_aclient/api/judges_api.py
is excluded by!**/generated/**
src/root/generated/openapi_aclient/models/__init__.py
is excluded by!**/generated/**
src/root/generated/openapi_aclient/models/execution_log_details.py
is excluded by!**/generated/**
src/root/generated/openapi_aclient/models/execution_log_details_skill.py
is excluded by!**/generated/**
src/root/generated/openapi_aclient/models/execution_log_list.py
is excluded by!**/generated/**
src/root/generated/openapi_aclient/models/execution_log_list_skill.py
is excluded by!**/generated/**
src/root/generated/openapi_aclient/models/judge_invite_request.py
is excluded by!**/generated/**
src/root/generated/openapi_aclient_README.md
is excluded by!**/generated/**
src/root/generated/openapi_client/api/execution_logs_api.py
is excluded by!**/generated/**
src/root/generated/openapi_client/api/judges_api.py
is excluded by!**/generated/**
src/root/generated/openapi_client/models/__init__.py
is excluded by!**/generated/**
src/root/generated/openapi_client/models/execution_log_details.py
is excluded by!**/generated/**
src/root/generated/openapi_client/models/execution_log_details_judge.py
is excluded by!**/generated/**
src/root/generated/openapi_client/models/execution_log_details_objective.py
is excluded by!**/generated/**
src/root/generated/openapi_client/models/execution_log_details_skill.py
is excluded by!**/generated/**
src/root/generated/openapi_client/models/execution_log_list.py
is excluded by!**/generated/**
src/root/generated/openapi_client/models/execution_log_list_skill.py
is excluded by!**/generated/**
src/root/generated/openapi_client/models/judge_invite_request.py
is excluded by!**/generated/**
src/root/generated/openapi_client_README.md
is excluded by!**/generated/**
📒 Files selected for processing (1)
openapi.yaml
(8 hunks)
🔇 Additional comments (1)
openapi.yaml (1)
2582-2586
: Revisitrequired
declarations for nullable fields.You’ve added
executed_item_*
andprompt_template
to therequired
list even though they arenullable
andreadOnly
. Confirm whether these should truly be mandatory or if they should be optional.Also applies to: 2592-2593
/v1/judges/{id}/invite/: | ||
post: | ||
operationId: judges_invite_create | ||
description: Send email invites to view a specific judge (up to 10 recipients) | ||
parameters: | ||
- in: path | ||
name: id | ||
schema: | ||
type: string | ||
format: uuid | ||
description: A UUID string identifying this judge. | ||
required: true | ||
tags: | ||
- judges | ||
requestBody: | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/JudgeInviteRequest' | ||
application/x-www-form-urlencoded: | ||
schema: | ||
$ref: '#/components/schemas/JudgeInviteRequest' | ||
multipart/form-data: | ||
schema: | ||
$ref: '#/components/schemas/JudgeInviteRequest' | ||
required: true | ||
security: | ||
- publicApiKey: [] | ||
responses: | ||
'200': | ||
content: | ||
application/json: | ||
schema: | ||
description: Invitations sent successfully | ||
description: '' | ||
/v1/judges/generate/: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Invalid response schema for invite endpoint.
The 200
response under POST /v1/judges/{id}/invite/
defines only a description
under schema
, which is not a valid schema object. At minimum, specify a type
, for example:
responses:
'200':
description: Invitations sent successfully
content:
application/json:
schema:
type: object
properties: {}
Or reference a concrete response schema.
🤖 Prompt for AI Agents
In openapi.yaml around lines 1297 to 1332, the 200 response for the POST
/v1/judges/{id}/invite/ endpoint has an invalid schema definition that only
includes a description without a proper schema object. To fix this, replace the
current schema under application/json with a valid schema object by either
specifying a type (e.g., type: object with properties) or referencing an
existing response schema. Also, move the description out of the schema and place
it directly under the response code level.
evaluation_context: | ||
type: object | ||
properties: | ||
name: | ||
contexts: | ||
type: array | ||
items: | ||
type: string | ||
expected_output: | ||
type: string | ||
description: The evaluation context used in the execution. Only included | ||
when explicitly requested with include=evaluation_context parameter. | ||
nullable: true | ||
readOnly: true | ||
executed_item_id: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Inconsistent optional fields in list schema and required array.
- The
evaluation_context
,executed_item_*
, andllm_output
fields are documented as “only included when explicitly requested” but are listed inrequired
. - Remove these from
required
or adjust descriptions to reflect that they may be omitted. - Also, add
description
entries forexecuted_item_*
properties to match the details in the list response.
Also applies to: 2625-2650, 2681-2684
🤖 Prompt for AI Agents
In openapi.yaml around lines 2611 to 2624, the fields evaluation_context,
executed_item_*, and llm_output are marked as required but their descriptions
say they are only included when explicitly requested, causing inconsistency.
Remove these fields from the required array or update their descriptions to
indicate they may be omitted. Additionally, add description entries for
executed_item_* properties to provide detailed explanations consistent with the
list response. Apply similar fixes to lines 2625-2650 and 2681-2684.
- in: query | ||
name: executed_item_id | ||
schema: | ||
type: string | ||
format: uuid | ||
- in: query |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Missing required
and description
for new query parameter.
The executed_item_id
parameter is added without an explicit required: false
flag or a descriptive text. For consistency and better client generation, include:
- name: executed_item_id
in: query
required: false
description: Filter execution logs by the UUID of the executed item.
schema:
type: string
format: uuid
🤖 Prompt for AI Agents
In openapi.yaml around lines 797 to 802, the new query parameter
executed_item_id is missing the required and description fields. Add required:
false and a description explaining it filters execution logs by the UUID of the
executed item to improve clarity and client generation. Update the parameter
definition to include these fields explicitly.
Adds new fields to execution log details and execution log list
Summary by CodeRabbit
New Features
Improvements
Removals