Skip to content

Conversation

@tisnik
Copy link
Contributor

@tisnik tisnik commented Jul 20, 2025

Description

LCORE-304: OpenAPI documentation in Markdown

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

Summary by CodeRabbit

  • Documentation
    • Updated the README to include a new link to a detailed OpenAPI documentation file.
    • Added a comprehensive OpenAPI specification document outlining all available API endpoints, their parameters, request/response formats, and error handling details.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 20, 2025

Walkthrough

The changes update the README to include a link to a new OpenAPI markdown documentation file and add this comprehensive OpenAPI specification (openapi.md) to the repository. The new documentation details all API endpoints, request/response schemas, and component models for the "foo bar baz service" API.

Changes

File(s) Change Summary
README.md Updated OpenAPI specification section: added link to docs/openapi.md and adjusted bullet points.
docs/openapi.md Added full OpenAPI specification in markdown format, detailing endpoints and data models.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant API Server

    Client->>API Server: GET /info
    API Server-->>Client: InfoResponse

    Client->>API Server: GET /models
    API Server-->>Client: ModelsResponse

    Client->>API Server: POST /query (QueryRequest)
    API Server-->>Client: QueryResponse

    Client->>API Server: POST /feedback (FeedbackRequest)
    API Server-->>Client: FeedbackResponse

    Client->>API Server: GET /conversation/{id}
    API Server-->>Client: ConversationResponse

    Client->>API Server: DELETE /conversation/{id}
    API Server-->>Client: ConversationDeleteResponse

    Client->>API Server: GET /ready
    API Server-->>Client: ReadinessResponse

    Client->>API Server: GET /live
    API Server-->>Client: LivenessResponse
Loading

Possibly related PRs

  • LCORE-304: Update OpenAPI schema #258: Adds conversation retrieval/deletion endpoints and extends the QueryRequest schema in the OpenAPI JSON; both PRs update the OpenAPI specification, making them directly related.
  • LCORE-304: Sync docs #238: Syncs and extends the OpenAPI JSON specification and configuration schemas; related through updates to OpenAPI documentation, though this PR adds a markdown spec while the related PR updates the JSON spec.

Poem

A new spec hops in, so clear and grand,
With endpoints and models, all close at hand.
The README now points to docs that delight,
For devs and for clients, the contract’s in sight.
🐰✨
APIs mapped, in markdown they gleam—
The docs of our service, a rabbit’s dream!


🪧 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.
    • Explain this complex logic.
    • 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. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • 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 src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

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

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

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

Documentation and Community

  • 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: 1

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

309-314: Specify a language on fenced code blocks

The YAML example is missing the language tag, triggering MD040.
Add yaml to enable syntax highlighting and keep linters happy:

-```
+```yaml
kind: Pod
metadata:
    name: private-reg
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between a383053 and 281b323.

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

28-28: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


29-29: Table column count
Expected: 3; Actual: 1; Too few cells, row will be missing data

(MD056, table-column-count)


29-29: Tables should be surrounded by blank lines

(MD058, blanks-around-tables)


44-44: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


45-45: Table column count
Expected: 3; Actual: 1; Too few cells, row will be missing data

(MD056, table-column-count)


45-45: Tables should be surrounded by blank lines

(MD058, blanks-around-tables)


60-60: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


61-61: Table column count
Expected: 3; Actual: 1; Too few cells, row will be missing data

(MD056, table-column-count)


62-62: Tables should be surrounded by blank lines

(MD058, blanks-around-tables)


81-81: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


82-82: Table column count
Expected: 3; Actual: 1; Too few cells, row will be missing data

(MD056, table-column-count)


83-83: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


84-84: Table column count
Expected: 3; Actual: 1; Too few cells, row will be missing data

(MD056, table-column-count)


85-85: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


86-86: Table column count
Expected: 3; Actual: 1; Too few cells, row will be missing data

(MD056, table-column-count)


88-88: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


89-89: Table column count
Expected: 3; Actual: 1; Too few cells, row will be missing data

(MD056, table-column-count)


89-89: Tables should be surrounded by blank lines

(MD058, blanks-around-tables)


109-109: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


110-110: Table column count
Expected: 3; Actual: 1; Too few cells, row will be missing data

(MD056, table-column-count)


110-110: Tables should be surrounded by blank lines

(MD058, blanks-around-tables)


125-125: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


126-126: Table column count
Expected: 3; Actual: 1; Too few cells, row will be missing data

(MD056, table-column-count)


127-127: Tables should be surrounded by blank lines

(MD058, blanks-around-tables)


156-156: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


157-157: Table column count
Expected: 3; Actual: 1; Too few cells, row will be missing data

(MD056, table-column-count)


158-158: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


159-159: Table column count
Expected: 3; Actual: 1; Too few cells, row will be missing data

(MD056, table-column-count)


160-160: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


161-161: Table column count
Expected: 3; Actual: 1; Too few cells, row will be missing data

(MD056, table-column-count)


162-162: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


163-163: Table column count
Expected: 3; Actual: 1; Too few cells, row will be missing data

(MD056, table-column-count)


163-163: Tables should be surrounded by blank lines

(MD058, blanks-around-tables)


181-181: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


182-182: Table column count
Expected: 3; Actual: 1; Too few cells, row will be missing data

(MD056, table-column-count)


182-182: Tables should be surrounded by blank lines

(MD058, blanks-around-tables)


202-202: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


203-203: Table column count
Expected: 3; Actual: 1; Too few cells, row will be missing data

(MD056, table-column-count)


206-206: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


207-207: Table column count
Expected: 3; Actual: 1; Too few cells, row will be missing data

(MD056, table-column-count)


207-207: Tables should be surrounded by blank lines

(MD058, blanks-around-tables)


227-227: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


228-228: Table column count
Expected: 3; Actual: 1; Too few cells, row will be missing data

(MD056, table-column-count)


231-231: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


232-232: Table column count
Expected: 3; Actual: 1; Too few cells, row will be missing data

(MD056, table-column-count)


232-232: Tables should be surrounded by blank lines

(MD058, blanks-around-tables)


247-247: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


248-248: Table column count
Expected: 3; Actual: 1; Too few cells, row will be missing data

(MD056, table-column-count)


249-249: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


250-250: Table column count
Expected: 3; Actual: 1; Too few cells, row will be missing data

(MD056, table-column-count)


250-250: Tables should be surrounded by blank lines

(MD058, blanks-around-tables)


265-265: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


266-266: Table column count
Expected: 3; Actual: 1; Too few cells, row will be missing data

(MD056, table-column-count)


267-267: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


268-268: Table column count
Expected: 3; Actual: 1; Too few cells, row will be missing data

(MD056, table-column-count)


268-268: Tables should be surrounded by blank lines

(MD058, blanks-around-tables)


283-283: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


284-284: Table column count
Expected: 3; Actual: 1; Too few cells, row will be missing data

(MD056, table-column-count)


285-285: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


286-286: Table column count
Expected: 3; Actual: 1; Too few cells, row will be missing data

(MD056, table-column-count)


287-287: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


288-288: Table column count
Expected: 3; Actual: 1; Too few cells, row will be missing data

(MD056, table-column-count)


288-288: Tables should be surrounded by blank lines

(MD058, blanks-around-tables)


309-309: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

⏰ 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: build-pr
🔇 Additional comments (2)
docs/openapi.md (1)

8-12: Fix the first table’s pipe alignment and trailing pipes

Tables are rendered incorrectly because each row lacks the closing |.
This breaks both GitHub preview and any auto-generated docs (mkdocs, MDX, etc.) and is the root cause of the first wave of MD055 / MD056 / MD058 linter errors.

-| URL | Description |
-|-----|-------------|
+| URL | Description |
+|-----|-------------|

Apply the same pattern to every table in the document to silence markdown-lint and guarantee proper rendering.
A quick markdownlint --fix pass will catch the remaining instances.

Likely an incorrect or invalid review comment.

README.md (1)

234-235: Addition looks good

The new bullet cleanly surfaces the Markdown spec beside the JSON one; no issues spotted.

Comment on lines +24 to +31
### ✅ Responses

| Status Code | Description | Component |
|-------------|-------------|-----------|
| 200 | Successful Response | string
|
## GET `/v1/info`

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

Rows with missing columns leave the “Component” cell empty

Several response tables declare three columns but supply data for only one, producing an “Actual: 1” linter error and a malformed layout. Either:

  1. Populate the missing two cells, or
  2. Drop the empty columns if they’re not needed.

Example fix:

-| 200 | Successful Response | [InfoResponse](#inforesponse)
+| 200 | Successful Response | [InfoResponse](#inforesponse) |

Resolve this pattern across the file to restore table integrity.

Committable suggestion skipped: line range outside the PR's diff.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

28-28: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


29-29: Table column count
Expected: 3; Actual: 1; Too few cells, row will be missing data

(MD056, table-column-count)


29-29: Tables should be surrounded by blank lines

(MD058, blanks-around-tables)

🤖 Prompt for AI Agents
In docs/openapi.md around lines 24 to 31, the response tables declare three
columns but only provide data for one, leaving the "Component" column empty and
causing linter errors and layout issues. To fix this, either fill in the missing
"Description" and "Component" cells with appropriate content or remove the extra
columns if they are unnecessary, ensuring all rows have the correct number of
columns to maintain table integrity.

@tisnik tisnik merged commit 91db47e into lightspeed-core:main Jul 20, 2025
17 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Jul 21, 2025
15 tasks
@coderabbitai coderabbitai bot mentioned this pull request Aug 4, 2025
15 tasks
This was referenced Aug 31, 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