Skip to content

LCORE-1356: fixed OpenAPI.md file#1240

Merged
tisnik merged 2 commits intolightspeed-core:mainfrom
tisnik:lcore-1356-fixed-openapi-md-file
Mar 1, 2026
Merged

LCORE-1356: fixed OpenAPI.md file#1240
tisnik merged 2 commits intolightspeed-core:mainfrom
tisnik:lcore-1356-fixed-openapi-md-file

Conversation

@tisnik
Copy link
Contributor

@tisnik tisnik commented Mar 1, 2026

Description

LCORE-1356: fixed OpenAPI.md file

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-1356

Summary by CodeRabbit

  • Documentation
    • Substantially expanded OpenAPI documentation with comprehensive endpoint information across all API versions and methods
    • Improved and standardized response schemas with detailed error codes and descriptions
    • Enhanced formatting and organization throughout for better clarity and consistency in the documentation

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 1, 2026

Walkthrough

This change substantially restructures and expands the OpenAPI specification documentation by adding a comprehensive endpoint listing table, standardizing response schemas across endpoints with consistent error codes (403, 500, 422, 503), reorganizing endpoint descriptions, and normalizing formatting throughout the document.

Changes

Cohort / File(s) Summary
OpenAPI Documentation Rework
docs/openapi.md
Comprehensive restructuring including new "List of REST API endpoints" table, standardized error response codes (403/500/422/503) across all endpoints, reorganized endpoint descriptions with updated parameters and response schemas, enhanced component definitions, and normalized table formatting for consistency.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is vague and uses generic terminology ('fixed') that doesn't convey the substantial nature of the changes, which include comprehensive restructuring, standardization, and expansion of OpenAPI documentation. Replace 'fixed' with a more descriptive action verb. Consider: 'Restructure and expand OpenAPI documentation with standardized response schemas' or 'Rework OpenAPI.md with comprehensive endpoint coverage and error handling'.
✅ 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
  • 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

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

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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/openapi.md (1)

3057-3122: ⚠️ Potential issue | 🟡 Minor

Fix broken response table formatting.

The response table for the /readiness endpoint has malformed structure. Examples are incorrectly embedded within table cells, causing the table to break. Lines 3088, 3105, and 3122 show trailing | characters that terminate the table rows improperly.

The table should either:

  1. Move examples outside the table (recommended for readability), or
  2. Use proper markdown table cell escaping if examples must stay inline

This same issue appears in several other endpoints (/liveness, /authorized, /metrics).

📝 Example fix for readiness endpoint
 | Status Code | Description | Component |
 |-------------|-------------|-----------|
 | 200 | Successful response | [ReadinessResponse](`#readinessresponse`) |
-| 401 | Unauthorized | [UnauthorizedResponse](`#unauthorizedresponse`)
+| 401 | Unauthorized | [UnauthorizedResponse](`#unauthorizedresponse`) |
+| 403 | Permission denied | [ForbiddenResponse](`#forbiddenresponse`) |
+| 503 | Service unavailable | [ServiceUnavailableResponse](`#serviceunavailableresponse`) |

 Examples

+```json
+{
+  "detail": {
+    "cause": "No Authorization header found",
+    "response": "Missing or invalid credentials provided by client"
+  }
+}
+```
-
-Examples
-
-
-
-
-
-```json
-{
-  "detail": {
-    "cause": "No Authorization header found",
-    "response": "Missing or invalid credentials provided by client"
-  }
-}
-```
-
-
-
-
-
-```json
-{
-  "detail": {
-    "cause": "No token found in Authorization header",
-    "response": "Missing or invalid credentials provided by client"
-  }
-}
-```
- |
-| 403 | Permission denied | [ForbiddenResponse](`#forbiddenresponse`)

Apply similar fixes to /liveness (lines 3123-3186), /authorized (lines 3187-3255), and /metrics (lines 3256-3361).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/openapi.md` around lines 3057 - 3122, The response table rows for the
/readiness (and similarly /liveness, /authorized, /metrics) endpoints are broken
because JSON Examples are embedded inside table cells and trailing " |" ended
rows; to fix, remove the inline Examples blocks from inside the markdown table
and place each example as a fenced code block immediately after the table row
for the corresponding status code (or alternatively escape pipe characters if
you must keep them inline), updating the
ReadinessResponse/UnauthorizedResponse/ForbiddenResponse/ServiceUnavailableResponse
rows so the table contains only the Status Code, Description, and Component
columns and the example JSON blocks follow the table.
🧹 Nitpick comments (1)
docs/openapi.md (1)

113-114: Minor wording improvement suggestion.

The description currently reads "Process GET requests to the /info endpoint, returning the service name, version and Llama-stack version."

Consider adding a comma for better readability: "returning the service name, version**,** and Llama-stack version" (Oxford comma).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/openapi.md` around lines 113 - 114, Update the GET /info operation
description to include the Oxford comma: change the sentence that currently
reads "Process GET requests to the /info endpoint, returning the service name,
version and Llama-stack version." to "Process GET requests to the /info
endpoint, returning the service name, version, and Llama-stack version." (locate
the description for the /info endpoint in docs/openapi.md).
🤖 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.md`:
- Around line 3057-3122: The response table rows for the /readiness (and
similarly /liveness, /authorized, /metrics) endpoints are broken because JSON
Examples are embedded inside table cells and trailing " |" ended rows; to fix,
remove the inline Examples blocks from inside the markdown table and place each
example as a fenced code block immediately after the table row for the
corresponding status code (or alternatively escape pipe characters if you must
keep them inline), updating the
ReadinessResponse/UnauthorizedResponse/ForbiddenResponse/ServiceUnavailableResponse
rows so the table contains only the Status Code, Description, and Component
columns and the example JSON blocks follow the table.

---

Nitpick comments:
In `@docs/openapi.md`:
- Around line 113-114: Update the GET /info operation description to include the
Oxford comma: change the sentence that currently reads "Process GET requests to
the /info endpoint, returning the service name, version and Llama-stack
version." to "Process GET requests to the /info endpoint, returning the service
name, version, and Llama-stack version." (locate the description for the /info
endpoint in docs/openapi.md).

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fe4cc08 and f514489.

📒 Files selected for processing (1)
  • docs/openapi.md

@tisnik tisnik merged commit 7597eac into lightspeed-core:main Mar 1, 2026
22 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