-
-
Notifications
You must be signed in to change notification settings - Fork 6
feat:OpenAPI: rename schemas, fix refs, update CreateConversation, examples #230
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
Conversation
WalkthroughSingle OpenAPI spec file updated to rename schemas and adjust references, change CreateConversation request body requirement and metadata typing, update operation descriptions, refresh multi-language examples, and remove an x-oaiMeta block. Changes
Sequence Diagram(s)Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (4)
src/libs/tryAGI.OpenAI/openapi.yaml (4)
1139-1142: CreateConversation request: confirm requestBody.required and 201 statusYou’ve switched the request schema to CreateConversationBody and responses to “Success.” Please confirm:
- Is the request body now optional? If yes, ensure SDKs/docs reflect that an empty body creates an empty conversation.
- Consider 201 Created for resource creation if a new conversation is created.
1169-1169: Clarify delete semantics and retention“Items in the conversation will not be deleted.” Specify retention/visibility (e.g., still listable/searchable? for how long?) to avoid ambiguity and client-side data lifecycle surprises.
1181-1181: Delete response code: consider 204 No ContentIf the delete endpoint returns no body, prefer 204. If a body is returned, keep 200 but document the response shape.
1272-1272: SDK example consistency (Go/others) and key namingExamples mix metadata keys (“topic” vs “foo”) and API key handling across languages. Unify for clarity; also please verify the Go snippet compiles with shared.Metadata literal.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (19)
src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI..JsonSerializerContext.g.csis excluded by!**/generated/**src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.CreateConversation.g.csis excluded by!**/generated/**src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.DeleteConversation.g.csis excluded by!**/generated/**src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.GetConversation.g.csis excluded by!**/generated/**src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.UpdateConversation.g.csis excluded by!**/generated/**src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.CreateConversation.g.csis excluded by!**/generated/**src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.DeleteConversation.g.csis excluded by!**/generated/**src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.GetConversation.g.csis excluded by!**/generated/**src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.UpdateConversation.g.csis excluded by!**/generated/**src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ComputerEnvironment.g.csis excluded by!**/generated/**src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ComputerEnvironmentNullable.g.csis excluded by!**/generated/**src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonSerializerContextTypes.g.csis excluded by!**/generated/**src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerEnvironment.g.csis excluded by!**/generated/**src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerUsePreviewTool.g.csis excluded by!**/generated/**src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateConversationBody.Json.g.csis excluded by!**/generated/**src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateConversationBody.g.csis excluded by!**/generated/**src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateConversationRequest.Json.g.csis excluded by!**/generated/**src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MetadataParam.g.csis excluded by!**/generated/**src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UpdateConversationBody.g.csis excluded by!**/generated/**
📒 Files selected for processing (1)
src/libs/tryAGI.OpenAI/openapi.yaml(13 hunks)
🔇 Additional comments (7)
src/libs/tryAGI.OpenAI/openapi.yaml (7)
1207-1207: LGTM: wording tweak“Get a conversation” is fine and clearer.
1219-1219: LGTM: response descriptionConsistent “Success” phrasing is OK.
1245-1245: LGTM: summary/descriptionNo issues.
1262-1262: LGTM: response descriptionNo issues.
10005-10008: LGTM: enum renameComputerEnvironment rename looks correct.
10173-10173: LGTM: $ref updatedReference now points to ComputerEnvironment.
28873-28873: LGTM: centralizing on MetadataGood alignment to the new Metadata schema.
| go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/conversations\"\n \"github.com/openai/openai-go/option\"\n \"github.com/openai/openai-go/responses\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n conversationItemList, err := client.Conversations.Items.New(\n context.TODO(),\n \"conv_123\",\n conversations.ItemNewParams{\n Items: []responses.ResponseInputItemUnionParam{responses.ResponseInputItemUnionParam{\n OfMessage: &responses.EasyInputMessageParam{\n Content: responses.EasyInputMessageContentUnionParam{\n OfString: openai.String(\"string\"),\n },\n Role: responses.EasyInputMessageRoleUser,\n Type: responses.EasyInputMessageTypeMessage,\n },\n }},\n },\n )\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", conversationItemList.FirstID)\n}\n" | ||
| java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.conversations.items.ConversationItemList;\nimport com.openai.models.conversations.items.ItemCreateParams;\nimport com.openai.models.responses.EasyInputMessage;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ItemCreateParams params = ItemCreateParams.builder()\n .conversationId(\"conv_123\")\n .addItem(EasyInputMessage.builder()\n .content(\"string\")\n .role(EasyInputMessage.Role.USER)\n .type(EasyInputMessage.Type.MESSAGE)\n .build())\n .build();\n ConversationItemList conversationItemList = client.conversations().items().create(params);\n }\n}" | ||
| javascript: "import OpenAI from \"openai\";\nconst client = new OpenAI();\n\nconst items = await client.conversations.items.create(\n \"conv_123\",\n {\n items: [\n {\n type: \"message\",\n role: \"user\",\n content: [{ type: \"input_text\", text: \"Hello!\" }],\n },\n {\n type: \"message\",\n role: \"user\",\n content: [{ type: \"input_text\", text: \"How are you?\" }],\n },\n ],\n }\n);\nconsole.log(items.data);\n" | ||
| node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst conversationItemList = await client.conversations.items.create('conv_123', {\n items: [{ content: 'string', role: 'user' }],\n});\n\nconsole.log(conversationItemList.first_id);" | ||
| python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nconversation_item_list = client.conversations.items.create(\n conversation_id=\"conv_123\",\n items=[{\n \"content\": \"string\",\n \"role\": \"user\",\n }],\n)\nprint(conversation_item_list.first_id)" | ||
| ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nconversation_item_list = openai.conversations.items.create(\"conv_123\", items: [{content: \"string\", role: :user}])\n\nputs(conversation_item_list)" | ||
| node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst conversationItemList = await client.conversations.items.create('conv_123', {\n items: [{ content: 'string', role: 'user', type: 'message' }],\n});\n\nconsole.log(conversationItemList.first_id);" | ||
| python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nconversation_item_list = client.conversations.items.create(\n conversation_id=\"conv_123\",\n items=[{\n \"content\": \"string\",\n \"role\": \"user\",\n \"type\": \"message\",\n }],\n)\nprint(conversation_item_list.first_id)" | ||
| ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nconversation_item_list = openai.conversations.items.create(\"conv_123\", items: [{content: \"string\", role: :user, type: :message}])\n\nputs(conversation_item_list)" |
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.
Examples diverge from schema: content shape inconsistent across SDKs
Node.js/Python/Ruby use content: "string" while schema/examples elsewhere use content: [{ type: "input_text", text: "..." }]. Mismatch will confuse users.
Apply this diff to align Node.js/Python/Ruby with the structured content used in curl/JS:
- node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst conversationItemList = await client.conversations.items.create('conv_123', {\n items: [{ content: 'string', role: 'user', type: 'message' }],\n});\n\nconsole.log(conversationItemList.first_id);"
+ node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({ apiKey: 'My API Key' });\n\nconst conversationItemList = await client.conversations.items.create('conv_123', {\n items: [{\n type: 'message',\n role: 'user',\n content: [{ type: 'input_text', text: 'Hello!' }]\n }]\n});\n\nconsole.log(conversationItemList.first_id);"
- python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nconversation_item_list = client.conversations.items.create(\n conversation_id=\"conv_123\",\n items=[{\n \"content\": \"string\",\n \"role\": \"user\",\n \"type\": \"message\",\n }],\n)\nprint(conversation_item_list.first_id)"
+ python: "from openai import OpenAI\n\nclient = OpenAI(api_key=\"My API Key\")\nconversation_item_list = client.conversations.items.create(\n conversation_id=\"conv_123\",\n items=[{\n \"type\": \"message\",\n \"role\": \"user\",\n \"content\": [{\"type\": \"input_text\", \"text\": \"Hello!\"}],\n }],\n)\nprint(conversation_item_list.first_id)"
- ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nconversation_item_list = openai.conversations.items.create(\"conv_123\", items: [{content: \"string\", role: :user, type: :message}])\n\nputs(conversation_item_list)"
+ ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nconversation_item_list = openai.conversations.items.create(\n \"conv_123\",\n items: [{\n type: :message,\n role: :user,\n content: [{ type: :input_text, text: \"Hello!\" }]\n }]\n)\n\nputs(conversation_item_list)"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| go: "package main\n\nimport (\n \"context\"\n \"fmt\"\n\n \"github.com/openai/openai-go\"\n \"github.com/openai/openai-go/conversations\"\n \"github.com/openai/openai-go/option\"\n \"github.com/openai/openai-go/responses\"\n)\n\nfunc main() {\n client := openai.NewClient(\n option.WithAPIKey(\"My API Key\"),\n )\n conversationItemList, err := client.Conversations.Items.New(\n context.TODO(),\n \"conv_123\",\n conversations.ItemNewParams{\n Items: []responses.ResponseInputItemUnionParam{responses.ResponseInputItemUnionParam{\n OfMessage: &responses.EasyInputMessageParam{\n Content: responses.EasyInputMessageContentUnionParam{\n OfString: openai.String(\"string\"),\n },\n Role: responses.EasyInputMessageRoleUser,\n Type: responses.EasyInputMessageTypeMessage,\n },\n }},\n },\n )\n if err != nil {\n panic(err.Error())\n }\n fmt.Printf(\"%+v\\n\", conversationItemList.FirstID)\n}\n" | |
| java: "package com.openai.example;\n\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.conversations.items.ConversationItemList;\nimport com.openai.models.conversations.items.ItemCreateParams;\nimport com.openai.models.responses.EasyInputMessage;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n OpenAIClient client = OpenAIOkHttpClient.fromEnv();\n\n ItemCreateParams params = ItemCreateParams.builder()\n .conversationId(\"conv_123\")\n .addItem(EasyInputMessage.builder()\n .content(\"string\")\n .role(EasyInputMessage.Role.USER)\n .type(EasyInputMessage.Type.MESSAGE)\n .build())\n .build();\n ConversationItemList conversationItemList = client.conversations().items().create(params);\n }\n}" | |
| javascript: "import OpenAI from \"openai\";\nconst client = new OpenAI();\n\nconst items = await client.conversations.items.create(\n \"conv_123\",\n {\n items: [\n {\n type: \"message\",\n role: \"user\",\n content: [{ type: \"input_text\", text: \"Hello!\" }],\n },\n {\n type: \"message\",\n role: \"user\",\n content: [{ type: \"input_text\", text: \"How are you?\" }],\n },\n ],\n }\n);\nconsole.log(items.data);\n" | |
| node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst conversationItemList = await client.conversations.items.create('conv_123', {\n items: [{ content: 'string', role: 'user' }],\n});\n\nconsole.log(conversationItemList.first_id);" | |
| python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nconversation_item_list = client.conversations.items.create(\n conversation_id=\"conv_123\",\n items=[{\n \"content\": \"string\",\n \"role\": \"user\",\n }],\n)\nprint(conversation_item_list.first_id)" | |
| ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nconversation_item_list = openai.conversations.items.create(\"conv_123\", items: [{content: \"string\", role: :user}])\n\nputs(conversation_item_list)" | |
| node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: 'My API Key',\n});\n\nconst conversationItemList = await client.conversations.items.create('conv_123', {\n items: [{ content: 'string', role: 'user', type: 'message' }],\n});\n\nconsole.log(conversationItemList.first_id);" | |
| python: "from openai import OpenAI\n\nclient = OpenAI(\n api_key=\"My API Key\",\n)\nconversation_item_list = client.conversations.items.create(\n conversation_id=\"conv_123\",\n items=[{\n \"content\": \"string\",\n \"role\": \"user\",\n \"type\": \"message\",\n }],\n)\nprint(conversation_item_list.first_id)" | |
| ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nconversation_item_list = openai.conversations.items.create(\"conv_123\", items: [{content: \"string\", role: :user, type: :message}])\n\nputs(conversation_item_list)" | |
| node.js: "import OpenAI from 'openai';\n\nconst client = new OpenAI({ apiKey: 'My API Key' });\n\nconst conversationItemList = await client.conversations.items.create('conv_123', {\n items: [{\n type: 'message',\n role: 'user',\n content: [{ type: 'input_text', text: 'Hello!' }]\n }]\n});\n\nconsole.log(conversationItemList.first_id);" | |
| python: "from openai import OpenAI\n\nclient = OpenAI(api_key=\"My API Key\")\nconversation_item_list = client.conversations.items.create(\n conversation_id=\"conv_123\",\n items=[{\n \"type\": \"message\",\n \"role\": \"user\",\n \"content\": [{\"type\": \"input_text\", \"text\": \"Hello!\"}],\n }],\n)\nprint(conversation_item_list.first_id)" | |
| ruby: "require \"openai\"\n\nopenai = OpenAI::Client.new(api_key: \"My API Key\")\n\nconversation_item_list = openai.conversations.items.create(\n \"conv_123\",\n items: [{\n type: :message,\n role: :user,\n content: [{ type: :input_text, text: \"Hello!\" }]\n }]\n)\n\nputs(conversation_item_list)" |
🤖 Prompt for AI Agents
In src/libs/tryAGI.OpenAI/openapi.yaml around lines 1396 to 1401, the example
payloads for Node.js/Python/Ruby show content as a plain string, but the schema
and other examples expect a structured array of content objects like [{ type:
"input_text", text: "..." }]; update the Node.js/Python/Ruby examples to use the
structured content array matching the schema (replace content: "string" with
content: [{ type: "input_text", text: "your text here" }] and adjust any sample
values accordingly) so all SDK examples are consistent with the documented
schema.
| CreateConversationBody: | ||
| type: object | ||
| properties: | ||
| items: | ||
| maxItems: 20 | ||
| type: array | ||
| items: | ||
| $ref: '#/components/schemas/InputItem' | ||
| description: "Initial items to include in the conversation context.\nYou may add up to 20 items at a time.\n" | ||
| description: Initial items to include in the conversation context. You may add up to 20 items at a time. | ||
| nullable: true | ||
| metadata: | ||
| $ref: '#/components/schemas/Metadata' | ||
| description: Create a conversation | ||
| type: 'null' | ||
| nullable: true |
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.
🧩 Analysis chain
Bug: metadata now only allows null; restore Metadata schema with nullability
Setting type: 'null' + nullable: true makes metadata effectively null-only and drops the schema. Use Metadata with null allowed.
Apply this diff (OpenAPI 3.0.x–safe):
- metadata:
- type: 'null'
- nullable: true
+ metadata:
+ allOf:
+ - $ref: '#/components/schemas/Metadata'
+ nullable: trueIf on OpenAPI 3.1, prefer:
- metadata: { type: [ 'object', 'null' ], $ref: '#/components/schemas/Metadata' } via anyOf/oneOf since $ref can’t be combined directly with type.
🏁 Script executed:
#!/bin/bash
set -euo pipefail
f="src/libs/tryAGI.OpenAI/openapi.yaml"
if [ ! -f "$f" ]; then
echo "MISSING: $f"
echo "Searching for openapi.yaml files in repo..."
rg --hidden --glob '!**/node_modules/**' -n "openapi.yaml" || true
exit 0
fi
echo "FOUND: $f"
echo
echo "---- openapi header (first 20 lines) ----"
sed -n '1,20p' "$f"
echo
echo "---- excerpt lines 11259-11271 ----"
nl -ba "$f" | sed -n '11259,11271p'
echo
echo "---- context lines 11250-11280 ----"
nl -ba "$f" | sed -n '11250,11280p'
echo
echo "---- all 'metadata:' occurrences (with 2 lines context) ----"
rg -n -C2 '\bmetadata:\b' "$f" || true
echo
echo "---- components.schemas.Metadata definition (6 lines context) ----"
rg -n -C6 '^\s*Metadata:' "$f" || true
rg -n -C6 '#/components/schemas/Metadata' "$f" || trueLength of output: 699
🏁 Script executed:
#!/bin/bash
f="src/libs/tryAGI.OpenAI/openapi.yaml"
if [ ! -f "$f" ]; then
echo "MISSING: $f"
echo "Searching for openapi.yaml files in repo..."
rg --hidden --glob '!**/node_modules/**' -n "openapi.yaml" || true
exit 0
fi
echo "FOUND: $f"
echo
echo "---- openapi header (first 20 lines) ----"
sed -n '1,20p' "$f" || true
echo
echo "---- excerpt lines 11259-11271 ----"
sed -n '11259,11271p' "$f" || true
echo
echo "---- context lines 11250-11280 ----"
sed -n '11250,11280p' "$f" || true
echo
echo "---- all 'metadata:' occurrences (with 2 lines context) ----"
rg -n -C2 '\bmetadata:\b' "$f" || true
echo
echo "---- locations of 'Metadata:' schema definitions ----"
rg -n '^\s*Metadata:' "$f" || true
echo
echo "---- print blocks around each 'Metadata:' occurrence (10 lines before, 40 after) ----"
rg -n '^\s*Metadata:' "$f" | while IFS=: read -r ln _; do
start=$((ln-10)); [ $start -lt 1 ] && start=1
end=$((ln+40))
echo "---- around line $ln ----"
sed -n "${start},${end}p" "$f" || true
done
echo
echo "---- references to '#/components/schemas/Metadata' ----"
rg -n '#/components/schemas/Metadata' "$f" || trueLength of output: 6545
Bug: metadata now only allows null; restore Metadata schema with nullability
CreateConversationBody.metadata is declared as type: 'null' + nullable: true, making it null-only and dropping the intended Metadata object schema. Replace with an allOf $ref to the Metadata schema and keep nullable (OpenAPI 3.0.x-safe). File: src/libs/tryAGI.OpenAI/openapi.yaml (lines ~11259-11271).
Apply this diff (OpenAPI 3.0.x–safe):
- metadata:
- type: 'null'
- nullable: true
+ metadata:
+ allOf:
+ - $ref: '#/components/schemas/Metadata'
+ nullable: true📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| CreateConversationBody: | |
| type: object | |
| properties: | |
| items: | |
| maxItems: 20 | |
| type: array | |
| items: | |
| $ref: '#/components/schemas/InputItem' | |
| description: "Initial items to include in the conversation context.\nYou may add up to 20 items at a time.\n" | |
| description: Initial items to include in the conversation context. You may add up to 20 items at a time. | |
| nullable: true | |
| metadata: | |
| $ref: '#/components/schemas/Metadata' | |
| description: Create a conversation | |
| type: 'null' | |
| nullable: true | |
| metadata: | |
| allOf: | |
| - $ref: '#/components/schemas/Metadata' | |
| nullable: true |
🤖 Prompt for AI Agents
In src/libs/tryAGI.OpenAI/openapi.yaml around lines 11259 to 11271,
CreateConversationBody.metadata is incorrectly defined as type: 'null' with
nullable: true which makes it null-only and drops the intended Metadata object
schema; replace that property with an allOf referencing the existing Metadata
schema and keep nullable: true (OpenAPI 3.0.x-safe) so metadata can be either
the Metadata object or null — update the CreateConversationBody schema to use an
allOf $ref to '#/components/schemas/Metadata' and set nullable: true instead of
type: 'null'.
Summary by CodeRabbit
Refactor
Documentation
Chores