Skip to content

LCORE-1356: Updated OpenAPI specification#1239

Merged
tisnik merged 1 commit intolightspeed-core:mainfrom
tisnik:lcore-1356-updated-openapi-specification
Mar 1, 2026
Merged

LCORE-1356: Updated OpenAPI specification#1239
tisnik merged 1 commit intolightspeed-core:mainfrom
tisnik:lcore-1356-updated-openapi-specification

Conversation

@tisnik
Copy link
Contributor

@tisnik tisnik commented Mar 1, 2026

Description

LCORE-1356: Updated OpenAPI specification

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

Release Notes

  • New Features

    • Added ability to interrupt in-progress streaming queries via a new endpoint
    • Added header propagation support for Model Context Protocol server integrations
  • Documentation

    • Enhanced API field validation constraints for improved request integrity

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 1, 2026

Walkthrough

Updates to OpenAPI specification documents to reflect changes in A2A endpoint operation identifiers, adds header propagation support to MCP server schemas, implements validation patterns for system info fields, and documents a new streaming query interrupt endpoint with associated request and response models.

Changes

Cohort / File(s) Summary
A2A and MCP Schema Updates
docs/openapi.json
Corrected operationIds for both GET and POST /a2a endpoints to handle_a2a_jsonrpc_a2a_post; added headers array fields to ModelContextProtocolServer and MCPServerAuthInfo for propagating client request headers; added regex pattern constraints to RlsapiV1CLA and RlsapiV1SystemInfo string fields to restrict character sets.
Streaming Query Interrupt Endpoint
docs/openapi.md
Introduced POST /v1/streaming_query/interrupt endpoint documentation with full request/response/error handling specifications; added StreamingInterruptRequest and StreamingInterruptResponse models with sample usage and error scenarios.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

Possibly related PRs

Suggested reviewers

  • asimurka
🚥 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 accurately describes the main change: updating the OpenAPI specification with new endpoints, models, and validation constraints.
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.json (1)

4450-4468: ⚠️ Potential issue | 🟠 Major

Fix duplicate operationId for GET and POST /a2a endpoints.

Both GET and POST operations on the /a2a path use the same operationId: handle_a2a_jsonrpc_a2a_post. This violates OpenAPI specifications and will break client code generation. The GET operation must use a unique operationId.

Proposed fix
             "get": {
                 "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_post",
+                "operationId": "handle_a2a_jsonrpc_a2a_get",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/openapi.json` around lines 4450 - 4468, The GET and POST operations for
the /a2a path both use the identical operationId "handle_a2a_jsonrpc_a2a_post",
which violates OpenAPI rules; change the GET operationId to a unique name (e.g.,
"handle_a2a_jsonrpc_a2a_get") wherever the GET operation definition appears and
update any tooling/client references that expect the old GET id so they point to
the new id (search for "handle_a2a_jsonrpc_a2a_post" in the GET block and
replace it with the new GET-specific operationId).
🧹 Nitpick comments (1)
docs/openapi.md (1)

5535-5547: Consider adding an example for consistency.

The StreamingInterruptRequest model is well-documented, but it would be more consistent with the related StreamingInterruptResponse model (which includes an example) to add a usage example here as well.

📝 Suggested addition for consistency
 ## StreamingInterruptRequest
 
 
 Model representing a request to interrupt an active streaming query.
 
 Attributes:
     request_id: Unique ID of the active streaming request to interrupt.
+
+Example:
+    ```python
+    request = StreamingInterruptRequest(
+        request_id="123e4567-e89b-12d3-a456-426614174000"
+    )
+    ```
 
 
 | Field | Type | Description |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/openapi.md` around lines 5535 - 5547, Add a usage example for the
StreamingInterruptRequest model to match StreamingInterruptResponse; update the
documentation block for StreamingInterruptRequest by inserting a short example
showing instantiation of StreamingInterruptRequest with a sample UUID for
request_id (e.g., "123e4567-e89b-12d3-a456-426614174000") immediately after the
descriptive paragraph and before the Field table so readers see concrete usage;
ensure the example follows the same formatting style as the
StreamingInterruptResponse example.
🤖 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.json`:
- Around line 4450-4468: The GET and POST operations for the /a2a path both use
the identical operationId "handle_a2a_jsonrpc_a2a_post", which violates OpenAPI
rules; change the GET operationId to a unique name (e.g.,
"handle_a2a_jsonrpc_a2a_get") wherever the GET operation definition appears and
update any tooling/client references that expect the old GET id so they point to
the new id (search for "handle_a2a_jsonrpc_a2a_post" in the GET block and
replace it with the new GET-specific operationId).

---

Nitpick comments:
In `@docs/openapi.md`:
- Around line 5535-5547: Add a usage example for the StreamingInterruptRequest
model to match StreamingInterruptResponse; update the documentation block for
StreamingInterruptRequest by inserting a short example showing instantiation of
StreamingInterruptRequest with a sample UUID for request_id (e.g.,
"123e4567-e89b-12d3-a456-426614174000") immediately after the descriptive
paragraph and before the Field table so readers see concrete usage; ensure the
example follows the same formatting style as the StreamingInterruptResponse
example.

ℹ️ 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 a99493e and ff55ff5.

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

@tisnik tisnik merged commit fe4cc08 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