Skip to content

LCORE-1348: Updated OpenAPI schema#1508

Merged
tisnik merged 1 commit intolightspeed-core:mainfrom
tisnik:lcore-1348-updated-openapi-schema
Apr 15, 2026
Merged

LCORE-1348: Updated OpenAPI schema#1508
tisnik merged 1 commit intolightspeed-core:mainfrom
tisnik:lcore-1348-updated-openapi-schema

Conversation

@tisnik
Copy link
Copy Markdown
Contributor

@tisnik tisnik commented Apr 15, 2026

Description

LCORE-1348: Updated OpenAPI schema

Type of change

  • Refactor
  • New feature
  • Bug fix
  • CVE fix
  • Optimization
  • Documentation Update
  • Configuration Update
  • Bump-up service version
  • Bump-up dependent library
  • Bump-up library or tool used for development (does not change the final image)
  • CI configuration change
  • Konflux configuration change
  • Unit tests improvement
  • Integration tests improvement
  • End to end tests improvement
  • Benchmarks improvement

Tools used to create PR

  • Assisted-by: N/A
  • Generated by: N/A

Related Tickets & Documents

  • Related Issue #LCORE-1348

Summary by CodeRabbit

  • Documentation
    • Enhanced API documentation with schema definitions for file upload operations and response handling
    • Added comprehensive sections documenting vector store management features, including creation, updates, file associations, and retrieval capabilities

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 15, 2026

Walkthrough

Added 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

Cohort / File(s) Summary
OpenAPI Documentation
docs/openapi.md
Added request/response schemas for file uploads (Body_create_file_v1_files_post, FileResponse, FileTooLargeResponse) and vector store operations (VectorStoreCreateRequest, VectorStoreFileCreateRequest, VectorStoreFileResponse, VectorStoreFilesListResponse, VectorStoreResponse, VectorStoreUpdateRequest, VectorStoresListResponse).

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'LCORE-1348: Updated OpenAPI schema' is vague and generic, using the non-descriptive phrase 'Updated OpenAPI schema' without clarifying what specific changes were made. Clarify the title with specific details about the main changes, such as 'LCORE-1348: Add OpenAPI schema documentation for file uploads and vector store operations' to better convey the scope of changes.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
✨ Simplify code
  • Create PR with simplified code

Warning

Review ran into problems

🔥 Problems

Timed 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.

❤️ Share

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

Copy link
Copy Markdown
Contributor

@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: 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

📥 Commits

Reviewing files that changed from the base of the PR and between 8cb1a12 and 0295034.

📒 Files selected for processing (2)
  • docs/openapi.json
  • docs/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.

FileResponse and FileTooLargeResponse fields are consistent with src/models/responses.py and the 413 behavior in src/app/endpoints/vector_stores.py.

Comment on lines +4468 to +4475
## Body_create_file_v1_files_post



| Field | Type | Description |
|-------|------|-------------|
| file | string | |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

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.

Comment on lines +7275 to +7283
| 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 |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

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.

Suggested change
| 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.

@tisnik tisnik merged commit fe463f2 into lightspeed-core:main Apr 15, 2026
30 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.

1 participant