-
Notifications
You must be signed in to change notification settings - Fork 69
LCORE-1224: up-to-date OpenAPI documentation after Splunk patch was merged #1052
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughOpenAPI documentation updated to introduce a new SplunkConfiguration schema and extend the Configuration model with Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ 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. Comment |
There was a problem hiding this 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 listsstring. 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/a2aPOST.
operationIdmust be unique across the spec. Both GET and POST now usehandle_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 toSplunkConfiguration.url.Adding
format: "uri"(and optionallyminLength) 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." },
| Returns: | ||
| PlainTextResponse: Response body containing the Prometheus metrics text | ||
| and the Prometheus content type. | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Search for PlainTextResponse occurrences
rg -n "PlainTextResponse" docs/openapi.md | head -20Repository: 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.mdRepository: 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.
| Useful resources: | ||
|
|
||
| - [Splunk HEC Docs](https://docs.splunk.com/Documentation/SplunkCloud) | ||
| - [About HEC](https://docs.splunk.com/Documentation/Splunk/latest/Data) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
| 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.
Description
LCORE-1224: up-to-date OpenAPI documentation after Splunk patch was merged
Type of change
Tools used to create PR
Related Tickets & Documents
Summary by CodeRabbit
Documentation
New Features
✏️ Tip: You can customize this high-level summary in your review settings.