Skip to content

Conversation

@tisnik
Copy link
Contributor

@tisnik tisnik commented Aug 12, 2025

Description

Fixed OpenAPI documentation formatting

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

Summary by CodeRabbit

  • Documentation
    • Cleaned up API reference tables by removing empty rows and aligning columns for clarity.
    • Standardized response listings so each status code maps to its component in a single, consistent row.
    • Improved readability and table closure across multiple endpoint sections (e.g., models, query, streaming, config, feedback, conversations, readiness, liveness, authorized, metrics).
    • No changes to API behavior or data; purely presentational improvements.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 12, 2025

Walkthrough

Markdown table rows in docs/openapi.md were corrected across multiple endpoint response sections: empty pipe-only rows were removed and replaced with rows listing the appropriate Component references. Minor alignment and closure fixes were applied. No endpoints, schemas, or logic changed.

Changes

Cohort / File(s) Summary of modifications
Docs formatting (OpenAPI tables)
docs/openapi.md
Replaced empty pipe rows with populated response rows including Component links; standardized status-to-component mapping for multiple endpoints; minor alignment/closure fixes in tables.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Poem

I hop through tables, row by row,
Fixing pipes where gaps would show.
Status sings to Component’s name,
Neat little cells that play the same.
With tidy paws I mark the trail—
Docs now crisp as a carrot tale. 🥕

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
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: 6

🧹 Nitpick comments (7)
docs/openapi.md (7)

110-111: Clarify streaming response type instead of "..."

Replace placeholder "..." with a clear indication of the streaming media type or a component name. If you don’t want to introduce a new component, explicitly note SSE:

-| 200 | Successful Response | ... |
+| 200 | Successful Response | text/event-stream (SSE) |

Alternatively, define and reference a "StreamingChunk" component if you document event payloads elsewhere.


111-111: Add missing blank line after table (MD058)

The table should be followed by a blank line.

 | 422 | Validation Error | [HTTPValidationError](#httpvalidationerror) |
+
 ## GET `/v1/config`

184-184: Add missing blank line after table (MD058)

Satisfy markdownlint by adding a blank line.

 | 200 | Successful Response | [StatusResponse](#statusresponse) |
+
 ## GET `/v1/conversations`

199-199: Fill missing 503 component for conversations list

Keep error response shape consistent.

 | 200 | Successful Response | [ConversationsListResponse](#conversationslistresponse) |
-| 503 | Service Unavailable |  |
+| 503 | Service Unavailable | [ErrorResponse](#errorresponse) |

265-266: Add missing blank line after table (MD058)

Add a blank line after the table.

 | 200 | Service is ready | [ReadinessResponse](#readinessresponse) |
 | 503 | Service is not ready | [ReadinessResponse](#readinessresponse) |
+
 ## GET `/liveness`

284-285: Add missing blank line after table (MD058)

Add a blank line after the table.

 | 200 | Service is alive | [LivenessResponse](#livenessresponse) |
 | 503 | Service is not alive | [LivenessResponse](#livenessresponse) |
+
 ## POST `/authorized`

306-308: Add missing blank line after table (MD058)

Add a blank line after the table.

 | 200 | The user is logged-in and authorized to access OLS | [AuthorizedResponse](#authorizedresponse) |
 | 400 | Missing or invalid credentials provided by client | [UnauthorizedResponse](#unauthorizedresponse) |
 | 403 | User is not authorized | [ForbiddenResponse](#forbiddenresponse) |
+
 ## GET `/metrics`
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 701065b and 6a38835.

📒 Files selected for processing (1)
  • docs/openapi.md (13 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
docs/openapi.md

91-91: Tables should be surrounded by blank lines

(MD058, blanks-around-tables)


111-111: Tables should be surrounded by blank lines

(MD058, blanks-around-tables)


166-166: Tables should be surrounded by blank lines

(MD058, blanks-around-tables)


184-184: Tables should be surrounded by blank lines

(MD058, blanks-around-tables)


223-223: Tables should be surrounded by blank lines

(MD058, blanks-around-tables)


246-246: Tables should be surrounded by blank lines

(MD058, blanks-around-tables)


266-266: Tables should be surrounded by blank lines

(MD058, blanks-around-tables)


285-285: Tables should be surrounded by blank lines

(MD058, blanks-around-tables)


308-308: Tables should be surrounded by blank lines

(MD058, blanks-around-tables)

🪛 LanguageTool
docs/openapi.md

[style] ~165-~165: Unless you want to emphasize “not”, use “cannot” which is more common.
Context: ...biddenresponse) | | 500 | User feedback can not be stored | [ErrorResponse](#errorrespo...

(CAN_NOT_PREMIUM)

⏰ 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). (1)
  • GitHub Check: e2e_tests
🔇 Additional comments (1)
docs/openapi.md (1)

1030-1030: LGTM: trailing newline at EOF

Adding/keeping a trailing newline at EOF is a good practice and avoids tooling diffs.

Comment on lines +66 to +68
| 200 | Successful Response | [ModelsResponse](#modelsresponse) |
| 503 | Connection to Llama Stack is broken | |

Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Fill missing 503 component for consistency

The 503 row has an empty Component. Recommend referencing a common error schema for consistency across endpoints.

Apply:

-| 503 | Connection to Llama Stack is broken |  |
+| 503 | Connection to Llama Stack is broken | [ErrorResponse](#errorresponse) |
+
📝 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
| 200 | Successful Response | [ModelsResponse](#modelsresponse) |
| 503 | Connection to Llama Stack is broken | |
| 200 | Successful Response | [ModelsResponse](#modelsresponse) |
| 503 | Connection to Llama Stack is broken | [ErrorResponse](#errorresponse) |
🤖 Prompt for AI Agents
In docs/openapi.md around lines 66 to 68, the 503 row has an empty Component;
update that table row to reference the shared error schema (e.g., replace the
empty cell with [ErrorResponse](#errorresponse) or the project’s canonical error
component name) so the 503 response points to the common error definition and
matches other endpoints; ensure the referenced component anchor exists or add a
matching ErrorResponse component if missing.

Comment on lines +87 to 92
| 200 | Successful Response | [QueryResponse](#queryresponse) |
| 400 | Missing or invalid credentials provided by client | [UnauthorizedResponse](#unauthorizedresponse) |
| 403 | User is not authorized | [ForbiddenResponse](#forbiddenresponse) |
| 503 | Service Unavailable | |
| 422 | Validation Error | [HTTPValidationError](#httpvalidationerror)
|
| 422 | Validation Error | [HTTPValidationError](#httpvalidationerror) |
## POST `/v1/streaming_query`
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Add missing blank line after table (MD058) and fill 503 component

  • markdownlint MD058: tables should be surrounded by blank lines — add one after the table.
  • Keep response tables consistent by defining the 503 component.
 | 200 | Successful Response | [QueryResponse](#queryresponse) |
 | 400 | Missing or invalid credentials provided by client | [UnauthorizedResponse](#unauthorizedresponse) |
 | 403 | User is not authorized | [ForbiddenResponse](#forbiddenresponse) |
-| 503 | Service Unavailable |  |
+| 503 | Service Unavailable | [ErrorResponse](#errorresponse) |
 | 422 | Validation Error | [HTTPValidationError](#httpvalidationerror) |
+
 ## POST `/v1/streaming_query`
📝 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
| 200 | Successful Response | [QueryResponse](#queryresponse) |
| 400 | Missing or invalid credentials provided by client | [UnauthorizedResponse](#unauthorizedresponse) |
| 403 | User is not authorized | [ForbiddenResponse](#forbiddenresponse) |
| 503 | Service Unavailable | |
| 422 | Validation Error | [HTTPValidationError](#httpvalidationerror)
|
| 422 | Validation Error | [HTTPValidationError](#httpvalidationerror) |
## POST `/v1/streaming_query`
| 200 | Successful Response | [QueryResponse](#queryresponse) |
| 400 | Missing or invalid credentials provided by client | [UnauthorizedResponse](#unauthorizedresponse) |
| 403 | User is not authorized | [ForbiddenResponse](#forbiddenresponse) |
| 503 | Service Unavailable | [ErrorResponse](#errorresponse) |
| 422 | Validation Error | [HTTPValidationError](#httpvalidationerror) |
## POST `/v1/streaming_query`
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

91-91: Tables should be surrounded by blank lines

(MD058, blanks-around-tables)

🤖 Prompt for AI Agents
In docs/openapi.md around lines 87 to 92, the response table lacks a trailing
blank line and the 503 status has no referenced response component; add a blank
line after the table to satisfy MD058 and update the 503 row to reference an
existing or new response component (e.g.,
[ServiceUnavailableResponse](#serviceunavailableresponse)), then add the
corresponding 503 component definition in the responses/components section (or
reuse an appropriate existing response schema) so the table remains consistent.

|-------------|-------------|-----------|
| 200 | Successful Response | [Configuration](#configuration)
|
| 200 | Successful Response | [Configuration](#configuration) |
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Fill missing 503 component and add blank line after table (MD058)

Bring this in line with other endpoints and satisfy markdownlint.

 | 200 | Successful Response | [Configuration](#configuration) |
-| 503 | Service Unavailable |  |
+| 503 | Service Unavailable | [ErrorResponse](#errorresponse) |
+
 ## POST `/v1/feedback`
📝 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
| 200 | Successful Response | [Configuration](#configuration) |
| 200 | Successful Response | [Configuration](#configuration) |
| 503 | Service Unavailable | [ErrorResponse](#errorresponse) |
## POST `/v1/feedback`
🤖 Prompt for AI Agents
In docs/openapi.md around line 132, the response table currently lists only the
200 response and is missing the 503 component and a blank line after the table;
update the table to include a 503 | Service Unavailable | [Error](#error) (or
the appropriate Error/ServiceUnavailable component used elsewhere) row to match
other endpoints, then insert a single blank line immediately after the table so
markdownlint rule MD058 is satisfied.

Comment on lines +162 to +166
| 200 | Feedback received and stored | [FeedbackResponse](#feedbackresponse) |
| 401 | Missing or invalid credentials provided by client | [UnauthorizedResponse](#unauthorizedresponse) |
| 403 | Client does not have permission to access resource | [ForbiddenResponse](#forbiddenresponse) |
| 500 | User feedback can not be stored | [ErrorResponse](#errorresponse) |
| 422 | Validation Error | [HTTPValidationError](#httpvalidationerror) |
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Grammar fix (“cannot”) and add blank line after table (MD058)

  • Use “cannot” (LanguageTool).
  • Add blank line after the table.
 | 200 | Feedback received and stored | [FeedbackResponse](#feedbackresponse) |
 | 401 | Missing or invalid credentials provided by client | [UnauthorizedResponse](#unauthorizedresponse) |
 | 403 | Client does not have permission to access resource | [ForbiddenResponse](#forbiddenresponse) |
-| 500 | User feedback can not be stored | [ErrorResponse](#errorresponse) |
+| 500 | User feedback cannot be stored | [ErrorResponse](#errorresponse) |
 | 422 | Validation Error | [HTTPValidationError](#httpvalidationerror) |
+
 ## GET `/v1/feedback/status`
📝 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
| 200 | Feedback received and stored | [FeedbackResponse](#feedbackresponse) |
| 401 | Missing or invalid credentials provided by client | [UnauthorizedResponse](#unauthorizedresponse) |
| 403 | Client does not have permission to access resource | [ForbiddenResponse](#forbiddenresponse) |
| 500 | User feedback can not be stored | [ErrorResponse](#errorresponse) |
| 422 | Validation Error | [HTTPValidationError](#httpvalidationerror) |
| 200 | Feedback received and stored | [FeedbackResponse](#feedbackresponse) |
| 401 | Missing or invalid credentials provided by client | [UnauthorizedResponse](#unauthorizedresponse) |
| 403 | Client does not have permission to access resource | [ForbiddenResponse](#forbiddenresponse) |
| 500 | User feedback cannot be stored | [ErrorResponse](#errorresponse) |
| 422 | Validation Error | [HTTPValidationError](#httpvalidationerror) |
## GET `/v1/feedback/status`
🧰 Tools
🪛 LanguageTool

[style] ~165-~165: Unless you want to emphasize “not”, use “cannot” which is more common.
Context: ...biddenresponse) | | 500 | User feedback can not be stored | [ErrorResponse](#errorrespo...

(CAN_NOT_PREMIUM)

🪛 markdownlint-cli2 (0.17.2)

166-166: Tables should be surrounded by blank lines

(MD058, blanks-around-tables)

🤖 Prompt for AI Agents
In docs/openapi.md around lines 162 to 166, the table entry uses "can not" and
the table is not followed by a blank line; update the text to use the correct
single-word form "cannot" for the 500 row ("User feedback cannot be stored") and
insert a blank line immediately after the table to satisfy the MD058 lint rule.

Comment on lines +220 to 224
| 200 | Successful Response | [ConversationResponse](#conversationresponse) |
| 404 | Not Found | |
| 503 | Service Unavailable | |
| 422 | Validation Error | [HTTPValidationError](#httpvalidationerror)
|
| 422 | Validation Error | [HTTPValidationError](#httpvalidationerror) |
## DELETE `/v1/conversations/{conversation_id}`
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Add missing components for 404/503 and blank line after table (MD058)

Recommend referencing a shared error response for Not Found and Service Unavailable, plus the required blank line.

 | 200 | Successful Response | [ConversationResponse](#conversationresponse) |
-| 404 | Not Found |  |
-| 503 | Service Unavailable |  |
+| 404 | Not Found | [ErrorResponse](#errorresponse) |
+| 503 | Service Unavailable | [ErrorResponse](#errorresponse) |
 | 422 | Validation Error | [HTTPValidationError](#httpvalidationerror) |
+
 ## DELETE `/v1/conversations/{conversation_id}`
📝 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
| 200 | Successful Response | [ConversationResponse](#conversationresponse) |
| 404 | Not Found | |
| 503 | Service Unavailable | |
| 422 | Validation Error | [HTTPValidationError](#httpvalidationerror)
|
| 422 | Validation Error | [HTTPValidationError](#httpvalidationerror) |
## DELETE `/v1/conversations/{conversation_id}`
| 200 | Successful Response | [ConversationResponse](#conversationresponse) |
| 404 | Not Found | [ErrorResponse](#errorresponse) |
| 503 | Service Unavailable | [ErrorResponse](#errorresponse) |
| 422 | Validation Error | [HTTPValidationError](#httpvalidationerror) |
## DELETE `/v1/conversations/{conversation_id}`
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

223-223: Tables should be surrounded by blank lines

(MD058, blanks-around-tables)

🤖 Prompt for AI Agents
In docs/openapi.md around lines 220 to 224, the responses table omits component
references for the 404 and 503 responses and lacks the required blank line after
the table; update the table rows to reference a shared error response component
(e.g., [ErrorResponse](#errorresponse) or whatever shared error component name
is used elsewhere) for both 404 and 503, and add a single blank line after the
table before the "## DELETE `/v1/conversations/{conversation_id}`" heading.

Comment on lines +243 to +246
| 200 | Successful Response | [ConversationDeleteResponse](#conversationdeleteresponse) |
| 404 | Not Found | |
| 503 | Service Unavailable | |
| 422 | Validation Error | [HTTPValidationError](#httpvalidationerror)
|
| 422 | Validation Error | [HTTPValidationError](#httpvalidationerror) |
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Add missing components for 404/503 and blank line after table (MD058)

Align with other sections and add required spacing.

 | 200 | Successful Response | [ConversationDeleteResponse](#conversationdeleteresponse) |
-| 404 | Not Found |  |
-| 503 | Service Unavailable |  |
+| 404 | Not Found | [ErrorResponse](#errorresponse) |
+| 503 | Service Unavailable | [ErrorResponse](#errorresponse) |
 | 422 | Validation Error | [HTTPValidationError](#httpvalidationerror) |
+
 ## GET `/readiness`
📝 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
| 200 | Successful Response | [ConversationDeleteResponse](#conversationdeleteresponse) |
| 404 | Not Found | |
| 503 | Service Unavailable | |
| 422 | Validation Error | [HTTPValidationError](#httpvalidationerror)
|
| 422 | Validation Error | [HTTPValidationError](#httpvalidationerror) |
| 200 | Successful Response | [ConversationDeleteResponse](#conversationdeleteresponse) |
| 404 | Not Found | [ErrorResponse](#errorresponse) |
| 503 | Service Unavailable | [ErrorResponse](#errorresponse) |
| 422 | Validation Error | [HTTPValidationError](#httpvalidationerror) |
## GET `/readiness`
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

246-246: Tables should be surrounded by blank lines

(MD058, blanks-around-tables)

🤖 Prompt for AI Agents
In docs/openapi.md around lines 243-246, the responses table is missing
component links for the 404 and 503 rows and lacks the required blank line after
the table; update the table so 404 and 503 reference the appropriate component
schemas (e.g., [NotFoundResponse](#notfoundresponse) and
[ServiceUnavailableResponse](#serviceunavailableresponse) or whichever existing
component names are used elsewhere), and add a single blank line after the table
to satisfy MD058 and match other sections.

@tisnik tisnik merged commit 0f4476c into lightspeed-core:main Aug 12, 2025
18 checks passed
@tisnik tisnik changed the title Fixed OpenAPI documentation formatting LCORE-433: Fixed OpenAPI documentation formatting Aug 12, 2025
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