LCORE-1332: Update OpenAPI schema#1170
Conversation
WalkthroughUpdated OpenAPI documentation to add new optional fields ( Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 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.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
docs/openapi.json (1)
8624-8639:⚠️ Potential issue | 🟡 MinorUpdate
ReferencedDocumentdescription to includesource.The schema now includes
source, but the description/Attributes list omits it. This is a doc correctness gap.✏️ Proposed doc fix
- "description": "Model representing a document referenced in generating a response.\n\nAttributes:\n doc_url: Url to the referenced doc.\n doc_title: Title of the referenced doc." + "description": "Model representing a document referenced in generating a response.\n\nAttributes:\n doc_url: Url to the referenced doc.\n doc_title: Title of the referenced doc.\n source: Index name identifying the knowledge source from configuration."🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/openapi.json` around lines 8624 - 8639, The ReferencedDocument schema description is missing the new "source" property; update the description string for the ReferencedDocument model to document the source field (e.g., add "source: Index name identifying the knowledge source from configuration" to the Attributes list) so the schema's description matches the properties, referencing the ReferencedDocument schema and its "source" property.
🧹 Nitpick comments (2)
docs/openapi.json (2)
1172-1184: Add examples to clarify rag_id resolution.The new description explains dual ID resolution, but the path parameter lacks concrete examples. Adding examples makes it unambiguous for clients.
💡 Proposed doc enhancement
"parameters": [ { "name": "rag_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Rag Id" - } + }, + "examples": { + "config_rag_id": { + "summary": "User-facing rag_id from config", + "value": "customer-support-rag" + }, + "vector_store_id": { + "summary": "Llama Stack vector_store_id", + "value": "vs_7b52a8cf-0fa3-489c-beab-27e061d102f3" + } + } } ],🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/openapi.json` around lines 1172 - 1184, Update the OpenAPI path parameter "rag_id" for operationId get_rag_endpoint_handler_v1_rags__rag_id__get to include concrete examples showing both a user-facing rag_id (LCORE config ID) and a llama-stack vector_store_id; modify the "parameters" entry for name "rag_id" to add an "example" or "examples" object that shows one example labeled e.g. "config_rag_id" (human-friendly ID) and one labeled "vector_store_id" (UUID or llama-stack format) so clients can see how dual-ID resolution works.
8366-8377: Add an example forRAGChunk.attributes.Since
attributesis free-form, an explicit example would reduce client guesswork.🧾 Suggested example
"attributes": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Attributes", - "description": "Document metadata from the RAG provider (e.g., url, title, author)" + "description": "Document metadata from the RAG provider (e.g., url, title, author)", + "examples": [ + { + "url": "https://example.com/docs/overview", + "title": "Product Overview", + "author": "Docs Team" + } + ] }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/openapi.json` around lines 8366 - 8377, Add an explicit example for RAGChunk.attributes in the OpenAPI schema: update the schema block for "attributes" under the RAGChunk definition to include an "example" property showing a representative free-form metadata object (e.g., url, title, author, created_at or source) so clients see expected keys and value shapes; modify the "attributes" object in the existing schema (the "attributes" anyOf block) to include this example field.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@docs/openapi.json`:
- Around line 8624-8639: The ReferencedDocument schema description is missing
the new "source" property; update the description string for the
ReferencedDocument model to document the source field (e.g., add "source: Index
name identifying the knowledge source from configuration" to the Attributes
list) so the schema's description matches the properties, referencing the
ReferencedDocument schema and its "source" property.
---
Nitpick comments:
In `@docs/openapi.json`:
- Around line 1172-1184: Update the OpenAPI path parameter "rag_id" for
operationId get_rag_endpoint_handler_v1_rags__rag_id__get to include concrete
examples showing both a user-facing rag_id (LCORE config ID) and a llama-stack
vector_store_id; modify the "parameters" entry for name "rag_id" to add an
"example" or "examples" object that shows one example labeled e.g.
"config_rag_id" (human-friendly ID) and one labeled "vector_store_id" (UUID or
llama-stack format) so clients can see how dual-ID resolution works.
- Around line 8366-8377: Add an explicit example for RAGChunk.attributes in the
OpenAPI schema: update the schema block for "attributes" under the RAGChunk
definition to include an "example" property showing a representative free-form
metadata object (e.g., url, title, author, created_at or source) so clients see
expected keys and value shapes; modify the "attributes" object in the existing
schema (the "attributes" anyOf block) to include this example field.
Description
LCORE-1332: Update OpenAPI schema
Type of change
Tools used to create PR
Related Tickets & Documents
Summary by CodeRabbit
New Features
Documentation