Skip to content

Conversation

@tisnik
Copy link
Contributor

@tisnik tisnik commented Jan 25, 2026

Description

LCORE-1224: up-to-date OpenAPI documentation after Splunk patch was merged

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

Tools used to create PR

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

Related Tickets & Documents

  • Related Issue #LCORE-1224

Summary by CodeRabbit

  • Documentation

    • Enhanced readiness and metrics endpoint descriptions with detailed response structures.
    • Added comprehensive API documentation for endpoint return types.
  • New Features

    • Added Splunk integration configuration support with customizable settings.
    • Added deployment environment field to configuration for telemetry tracking.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 25, 2026

Walkthrough

OpenAPI documentation updated to introduce a new SplunkConfiguration schema and extend the Configuration model with splunk and deployment_environment fields. Readiness and metrics endpoint descriptions expanded with detailed return type documentation. A2A JSON-RPC operationId updated from POST to GET variant.

Changes

Cohort / File(s) Change Summary
OpenAPI Specification and Documentation
docs/openapi.json, docs/openapi.md
Added SplunkConfiguration schema with Splunk HEC integration fields (enabled, url, token_path, index, source, timeout, verify_ssl). Extended Configuration schema to include splunk and deployment_environment fields. Expanded readiness endpoint description to document ReadinessResponse return type with ready, reason, and providers fields. Enhanced metrics endpoint description to document PlainTextResponse return type. Updated A2A JSON-RPC operationId from handle_a2a_jsonrpc_a2a_post to handle_a2a_jsonrpc_a2a_get in /a2a endpoints.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 3
✅ 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 directly and clearly describes the main change: updating OpenAPI documentation after a Splunk patch was merged, which aligns with the actual changes to both openapi.json and openapi.md files.
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.


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

Caution

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

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

3651-3664: Align metrics response component with PlainTextResponse.

The return text now says PlainTextResponse, but the responses table still lists string. Update the table to reference the new component to avoid confusing API consumers.

✅ Suggested doc fix
-| 200 | Successful Response | string |
+| 200 | Successful Response | [PlainTextResponse](`#plaintextresponse`) |
docs/openapi.json (1)

4291-4312: Fix duplicate operationId for /a2a POST.

operationId must be unique across the spec. Both GET and POST now use handle_a2a_jsonrpc_a2a_get, which can break OpenAPI tooling and SDK generation. Consider restoring the POST-specific operationId.
(See Line 4293 and Line 4311.)

🔧 Suggested fix
 "post": {
   "tags": [
     "a2a"
   ],
   "summary": "Handle A2A Jsonrpc",
   "description": "Handle A2A JSON-RPC requests following the A2A protocol specification.\n\nThis endpoint uses the DefaultRequestHandler from the A2A SDK to handle\nall JSON-RPC requests including message/send, message/stream, etc.\n\nThe A2A SDK application is created per-request to include authentication\ncontext while still leveraging FastAPI's authorization middleware.\n\nAutomatically detects streaming requests (message/stream JSON-RPC method)\nand returns a StreamingResponse to enable real-time chunk delivery.\n\nArgs:\n    request: FastAPI request object\n    auth: Authentication tuple\n    mcp_headers: MCP headers for context propagation\n\nReturns:\n    JSON-RPC response or streaming response",
-  "operationId": "handle_a2a_jsonrpc_a2a_get",
+  "operationId": "handle_a2a_jsonrpc_a2a_post",
🤖 Fix all issues with AI agents
In `@docs/openapi.md`:
- Around line 5547-5551: The unordered list under "Useful resources:" in the
SplunkConfiguration section has leading indentation causing markdownlint MD007;
remove the leading spaces so each list item starts at column 0 (i.e., left-align
the lines containing "- [Splunk HEC Docs](...)" and "- [About HEC](...)") so the
hyphen is the first character on the line and the list indentation matches
top-level lists.
- Around line 3651-3654: Add a new schema entry named PlainTextResponse under
the Components -> schemas section: define it as an object with two properties
(e.g., "body" : type: string — the Prometheus metrics text, and "content_type" :
type: string — the response MIME type), include brief descriptions and an
example (like "text/plain; version=0.0.4"), and ensure the existing reference to
PlainTextResponse in the Prometheus metrics operation resolves to this
component.
🧹 Nitpick comments (1)
docs/openapi.json (1)

8845-8914: Consider adding URI formatting to SplunkConfiguration.url.

Adding format: "uri" (and optionally minLength) improves schema validation and client generation, with no behavioral change.

♻️ Optional schema tightening
 "url": {
   "anyOf": [
     {
-      "type": "string"
+      "type": "string",
+      "format": "uri",
+      "minLength": 1
     },
     {
       "type": "null"
     }
   ],
   "title": "HEC URL",
   "description": "Splunk HEC endpoint URL."
 },

Comment on lines +3651 to +3654
Returns:
PlainTextResponse: Response body containing the Prometheus metrics text
and the Prometheus content type.

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

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Search for PlainTextResponse occurrences
rg -n "PlainTextResponse" docs/openapi.md | head -20

Repository: lightspeed-core/lightspeed-stack

Length of output: 156


🏁 Script executed:

#!/bin/bash
# Check the context around line 3652 (3651-3654)
echo "=== Lines 3648-3658 ===" 
sed -n '3648,3658p' docs/openapi.md

echo ""
echo "=== Lines 5275-5285 ===" 
sed -n '5275,5285p' docs/openapi.md

echo ""
echo "=== Lines 5560-5570 ===" 
sed -n '5560,5570p' docs/openapi.md

Repository: lightspeed-core/lightspeed-stack

Length of output: 870


Add PlainTextResponse schema definition to components section.

PlainTextResponse is referenced at line 3652 but is not defined as a schema component anywhere in docs/openapi.md. Add a schema entry under Components for PlainTextResponse with properties for the response body and content type.

🤖 Prompt for AI Agents
In `@docs/openapi.md` around lines 3651 - 3654, Add a new schema entry named
PlainTextResponse under the Components -> schemas section: define it as an
object with two properties (e.g., "body" : type: string — the Prometheus metrics
text, and "content_type" : type: string — the response MIME type), include brief
descriptions and an example (like "text/plain; version=0.0.4"), and ensure the
existing reference to PlainTextResponse in the Prometheus metrics operation
resolves to this component.

Comment on lines +5547 to +5551
Useful resources:

- [Splunk HEC Docs](https://docs.splunk.com/Documentation/SplunkCloud)
- [About HEC](https://docs.splunk.com/Documentation/Splunk/latest/Data)

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

Fix unordered list indentation in SplunkConfiguration resources.

Markdownlint MD007 flags the list indentation. Align the list indentation to column 0.

🧹 Suggested formatting tweak
-  - [Splunk HEC Docs](https://docs.splunk.com/Documentation/SplunkCloud)
-  - [About HEC](https://docs.splunk.com/Documentation/Splunk/latest/Data)
+- [Splunk HEC Docs](https://docs.splunk.com/Documentation/SplunkCloud)
+- [About HEC](https://docs.splunk.com/Documentation/Splunk/latest/Data)
📝 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
Useful resources:
- [Splunk HEC Docs](https://docs.splunk.com/Documentation/SplunkCloud)
- [About HEC](https://docs.splunk.com/Documentation/Splunk/latest/Data)
Useful resources:
- [Splunk HEC Docs](https://docs.splunk.com/Documentation/SplunkCloud)
- [About HEC](https://docs.splunk.com/Documentation/Splunk/latest/Data)
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

5549-5549: Unordered list indentation
Expected: 0; Actual: 2

(MD007, ul-indent)


5550-5550: Unordered list indentation
Expected: 0; Actual: 2

(MD007, ul-indent)

🤖 Prompt for AI Agents
In `@docs/openapi.md` around lines 5547 - 5551, The unordered list under "Useful
resources:" in the SplunkConfiguration section has leading indentation causing
markdownlint MD007; remove the leading spaces so each list item starts at column
0 (i.e., left-align the lines containing "- [Splunk HEC Docs](...)" and "-
[About HEC](...)") so the hyphen is the first character on the line and the list
indentation matches top-level lists.

@tisnik tisnik merged commit 8623fca into lightspeed-core:main Jan 25, 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