Skip to content

Conversation

@tisnik
Copy link
Contributor

@tisnik tisnik commented Oct 7, 2025

Description

LCORE-632: Update OpenAPI doc

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

Related Tickets & Documents

  • Related Issue #LCORE-632

Summary by CodeRabbit

  • Documentation
    • Added API/OpenAPI documentation for a new GET /v1/shields endpoint, including endpoint description, success and error responses, and example usage.
    • Introduced the ShieldsResponse schema (shields: array) to the public API specification.
    • Documented error behavior (e.g., connection or retrieval failures) with appropriate status codes.
    • Ensured existing endpoints and documentation remain unchanged.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 7, 2025

Walkthrough

Adds documentation for a new GET /v1/shields endpoint to the OpenAPI docs, introducing a ShieldsResponse model with a shields array. Updates occur in docs/openapi.md and docs/output.md. No code or existing endpoint logic changes; documentation and public schema declarations are extended.

Changes

Cohort / File(s) Change Summary
API Docs: Shields endpoint and model
docs/openapi.md, docs/output.md
Documented GET /v1/shields endpoint, including handler description, success (200) and error (500) responses. Introduced ShieldsResponse model with field shields (array). No other endpoints altered.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant C as Client
  participant API as API Server
  participant H as Shields Handler
  participant S as Shields Source

  C->>API: GET /v1/shields
  API->>H: Route request
  H->>S: Retrieve shields
  alt Success
    S-->>H: Shields list
    H-->>API: 200 OK (ShieldsResponse)
    API-->>C: 200 OK (shields: [...])
  else Connection/Retrieval Failure
    H-->>API: HTTPException (500)
    API-->>C: 500 Internal Server Error
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

A rabbit taps docs with a gentle thrum,
New shields parade—here they come! 🛡️
Paths inked neat, responses aligned,
Errors noted, models defined.
I twitch my nose, approve the yields—
Hop! We now document shields.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title includes the ticket identifier and clearly describes the primary change of updating the OpenAPI documentation, which matches the documented additions of the new Shields endpoint. It concisely reflects the pull request’s scope without extraneous details.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ 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.

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between da80226 and a4eeded.

📒 Files selected for processing (2)
  • docs/openapi.md (2 hunks)
  • docs/output.md (2 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
docs/openapi.md

108-108: Tables should be surrounded by blank lines

(MD058, blanks-around-tables)

docs/output.md

108-108: Tables should be surrounded by blank lines

(MD058, blanks-around-tables)

⏰ 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). (2)
  • GitHub Check: build-pr
  • GitHub Check: e2e_tests (ci)

Comment on lines +105 to +108
| Status Code | Description | Component |
|-------------|-------------|-----------|
| 200 | Successful Response | [ShieldsResponse](#shieldsresponse) |
| 500 | 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.

⚠️ Potential issue | 🟡 Minor

Add a blank line after the responses table.

markdownlint (MD058) complains because the ### ✅ Responses table is immediately followed by the next heading. Insert a blank line after the final | 500 | … | row to keep the table surrounded by blank lines.

 | 200 | Successful Response | [ShieldsResponse](#shieldsresponse) |
 | 500 | Connection to Llama Stack is broken |  |
+
 ## POST `/v1/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
| Status Code | Description | Component |
|-------------|-------------|-----------|
| 200 | Successful Response | [ShieldsResponse](#shieldsresponse) |
| 500 | Connection to Llama Stack is broken | |
| Status Code | Description | Component |
|-------------|-------------|-----------|
| 200 | Successful Response | [ShieldsResponse](#shieldsresponse) |
| 500 | Connection to Llama Stack is broken | |
## POST `/v1/query`
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

108-108: Tables should be surrounded by blank lines

(MD058, blanks-around-tables)

🤖 Prompt for AI Agents
In docs/openapi.md around lines 105 to 108, the responses table under "### ✅
Responses" is immediately followed by the next heading which triggers
markdownlint MD058; add a single blank line after the final table row (the line
containing "| 500 | Connection to Llama Stack is broken |  |") so the table is
separated from the following heading by an empty line.

Comment on lines +105 to +108
| Status Code | Description | Component |
|-------------|-------------|-----------|
| 200 | Successful Response | [ShieldsResponse](#shieldsresponse) |
| 500 | 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.

⚠️ Potential issue | 🟡 Minor

Insert a blank line after the shields responses table.

markdownlint (MD058) flags this spot because the table is not followed by a blank line before the next heading. Add an empty line after the | 500 | … | row to satisfy the rule.

 | 200 | Successful Response | [ShieldsResponse](#shieldsresponse) |
 | 500 | Connection to Llama Stack is broken |  |
+
 ## POST `/v1/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
| Status Code | Description | Component |
|-------------|-------------|-----------|
| 200 | Successful Response | [ShieldsResponse](#shieldsresponse) |
| 500 | Connection to Llama Stack is broken | |
| Status Code | Description | Component |
|-------------|-------------|-----------|
| 200 | Successful Response | [ShieldsResponse](#shieldsresponse) |
| 500 | Connection to Llama Stack is broken | |
## POST `/v1/query`
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

108-108: Tables should be surrounded by blank lines

(MD058, blanks-around-tables)

🤖 Prompt for AI Agents
In docs/output.md around lines 105 to 108, the markdown table of status codes is
not followed by a blank line which triggers markdownlint MD058; fix it by
inserting a single empty line immediately after the last table row (`| 500 |
Connection to Llama Stack is broken |  |`) so the table is separated from the
following content/heading.

@tisnik tisnik merged commit d0c10a5 into lightspeed-core:main Oct 7, 2025
18 of 19 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