LCORE-1348: Updated OpenAPI schema#1508
Conversation
WalkthroughAdded OpenAPI documentation for file upload and vector store operations, including request/response schemas and data models for files, vector stores, and their associated operations. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 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. ✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Warning Review ran into problems🔥 ProblemsTimed out fetching pipeline failures after 30000ms 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: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/openapi.md`:
- Around line 7275-7283: The OpenAPI docs are missing the model-level length
constraints for VectorStoreCreateRequest.name; update the table row for "name"
to include its min_length=1 and max_length=256 (e.g., in the Type or Description
column: "string (min_length=1, max_length=256)") so the docs match the
VectorStoreCreateRequest.name contract and clients can validate accordingly.
- Around line 4468-4475: The OpenAPI entry Body_create_file_v1_files_post
incorrectly documents the file field as a plain string; update the POST
/v1/files operation to declare it consumes multipart/form-data and document the
file parameter as an UploadFile/binary file (e.g., use content:
multipart/form-data with a schema referencing UploadFile or type: string format:
binary) so clients know to send a binary multipart file rather than a generic
string.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 2673acb9-47e7-416e-907d-ec7f0b358e4b
📒 Files selected for processing (2)
docs/openapi.jsondocs/openapi.md
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
- GitHub Check: E2E: library mode / ci / group 2
- GitHub Check: E2E: library mode / ci / group 1
- GitHub Check: E2E: server mode / ci / group 1
- GitHub Check: E2E: server mode / ci / group 3
- GitHub Check: E2E: library mode / ci / group 3
- GitHub Check: Konflux kflux-prd-rh02 / lightspeed-stack-on-pull-request
- GitHub Check: E2E: server mode / ci / group 2
🔇 Additional comments (1)
docs/openapi.md (1)
4959-4993: File response components align with backend models.
FileResponseandFileTooLargeResponsefields are consistent withsrc/models/responses.pyand the 413 behavior insrc/app/endpoints/vector_stores.py.
| ## Body_create_file_v1_files_post | ||
|
|
||
|
|
||
|
|
||
| | Field | Type | Description | | ||
| |-------|------|-------------| | ||
| | file | string | | | ||
|
|
There was a problem hiding this comment.
Document upload field as binary multipart, not generic string.
POST /v1/files consumes UploadFile (multipart/form-data). Documenting file as plain string is misleading and can cause incorrect client payloads.
🛠️ Proposed doc fix
## Body_create_file_v1_files_post
| Field | Type | Description |
|-------|------|-------------|
-| file | string | |
+| file | string (binary) | File content to upload via multipart/form-data |
+
+Required fields: `file`🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/openapi.md` around lines 4468 - 4475, The OpenAPI entry
Body_create_file_v1_files_post incorrectly documents the file field as a plain
string; update the POST /v1/files operation to declare it consumes
multipart/form-data and document the file parameter as an UploadFile/binary file
(e.g., use content: multipart/form-data with a schema referencing UploadFile or
type: string format: binary) so clients know to send a binary multipart file
rather than a generic string.
| | Field | Type | Description | | ||
| |-------|------|-------------| | ||
| | name | string | Name of the vector store | | ||
| | embedding_model | | Embedding model to use for the vector store | | ||
| | embedding_dimension | | Dimension of the embedding vectors | | ||
| | chunking_strategy | | Chunking strategy configuration | | ||
| | provider_id | | Vector store provider identifier | | ||
| | metadata | | Metadata dictionary for storing session information | | ||
|
|
There was a problem hiding this comment.
Add name length constraints to match request model contract.
VectorStoreCreateRequest.name is documented, but its model-level constraints (min_length=1, max_length=256) are missing. This creates avoidable client-side validation surprises.
🛠️ Proposed doc fix
| Field | Type | Description |
|-------|------|-------------|
-| name | string | Name of the vector store |
+| name | string | Name of the vector store (1-256 characters) |📝 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.
| | Field | Type | Description | | |
| |-------|------|-------------| | |
| | name | string | Name of the vector store | | |
| | embedding_model | | Embedding model to use for the vector store | | |
| | embedding_dimension | | Dimension of the embedding vectors | | |
| | chunking_strategy | | Chunking strategy configuration | | |
| | provider_id | | Vector store provider identifier | | |
| | metadata | | Metadata dictionary for storing session information | | |
| | Field | Type | Description | | |
| |-------|------|-------------| | |
| | name | string | Name of the vector store (1-256 characters) | | |
| | embedding_model | | Embedding model to use for the vector store | | |
| | embedding_dimension | | Dimension of the embedding vectors | | |
| | chunking_strategy | | Chunking strategy configuration | | |
| | provider_id | | Vector store provider identifier | | |
| | metadata | | Metadata dictionary for storing session information | |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/openapi.md` around lines 7275 - 7283, The OpenAPI docs are missing the
model-level length constraints for VectorStoreCreateRequest.name; update the
table row for "name" to include its min_length=1 and max_length=256 (e.g., in
the Type or Description column: "string (min_length=1, max_length=256)") so the
docs match the VectorStoreCreateRequest.name contract and clients can validate
accordingly.
Description
LCORE-1348: Updated OpenAPI schema
Type of change
Tools used to create PR
Related Tickets & Documents
Summary by CodeRabbit