-
Notifications
You must be signed in to change notification settings - Fork 54
LCORE-632: updated OpenAPI Swagger #647
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
LCORE-632: updated OpenAPI Swagger #647
Conversation
WalkthroughOpenAPI artifacts and docs were updated to add provider, tool, and conversation update endpoints and models. A new ByokRag schema and byok_rag configuration field were introduced. Providers-related schemas were restructured. Documentation pages were synchronized to reflect these endpoints, models, and configuration changes. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Client
participant API as API Gateway
participant ProviderSvc as Providers Service
Client->>API: GET /v1/providers
API->>ProviderSvc: Fetch providers grouped by API type
ProviderSvc-->>API: ProvidersListResponse
API-->>Client: 200 ProvidersListResponse
alt Not found/invalid
API-->>Client: 404/422 error
else Server error
API-->>Client: 500 error
end
sequenceDiagram
autonumber
actor Client
participant API as API Gateway
participant ConvSvc as Conversations Service
Client->>API: PUT /v2/conversations/{id} (ConversationUpdateRequest)
API->>ConvSvc: Update conversation topic summary
ConvSvc-->>API: ConversationUpdateResponse
API-->>Client: 200 ConversationUpdateResponse
alt Invalid request
API-->>Client: 422 error
else Server error
API-->>Client: 500 error
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
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: 1
🧹 Nitpick comments (2)
docs/openapi.md (1)
104-109: Add blank lines around new tablesmarkdownlint (MD058) flags these tables because there’s no blank line separating them from surrounding content. Please insert an empty line after each table (likewise for the other new tables you added) to keep docs lint-clean.
Example:| 200 | Successful Response | [ToolsResponse](#toolsresponse) | | 500 | Connection to Llama Stack is broken or MCP server error | | + ## GET `/v1/shields`docs/output.md (1)
104-109: Add blank lines after the inserted tablesSame MD058 warning here—the tables you just added need a blank line separating them from the next heading. Please add an empty line after each of the new tables (tools/providers/conversation updates) to satisfy markdownlint.
| 200 | Successful Response | [ToolsResponse](#toolsresponse) | | 500 | Connection to Llama Stack is broken or MCP server error | | + ## GET `/v1/shields`
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
docs/openapi.json(6 hunks)docs/openapi.md(8 hunks)docs/output.md(8 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
docs/output.md
109-109: Tables should be surrounded by blank lines
(MD058, blanks-around-tables)
162-162: Tables should be surrounded by blank lines
(MD058, blanks-around-tables)
195-195: Tables should be surrounded by blank lines
(MD058, blanks-around-tables)
559-559: Tables should be surrounded by blank lines
(MD058, blanks-around-tables)
docs/openapi.md
109-109: Tables should be surrounded by blank lines
(MD058, blanks-around-tables)
162-162: Tables should be surrounded by blank lines
(MD058, blanks-around-tables)
195-195: Tables should be surrounded by blank lines
(MD058, blanks-around-tables)
559-559: 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)
| "404": { | ||
| "response": "Provider with given id not found", | ||
| "description": "Not Found" | ||
| }, | ||
| "500": { | ||
| "response": "Unable to retrieve list of providers", | ||
| "cause": "Connection to Llama Stack is broken" | ||
| "cause": "Connection to Llama Stack is broken", | ||
| "description": "Internal Server Error" | ||
| }, |
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 invalid error response shape
Response objects may only carry description, headers, content, or links. Adding response/cause keys at the top level breaks OpenAPI validation, so clients and tooling will reject the spec. Please move these details inside the JSON payload (e.g. reuse ErrorResponse) and drop the extraneous fields.
- "response": "Provider with given id not found",
- "description": "Not Found"
+ "description": "Not Found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ErrorResponse"
+ },
+ "example": {
+ "detail": {
+ "response": "Provider with given id not found"
+ }
+ }
+ }
+ }
},
"500": {
- "response": "Unable to retrieve list of providers",
- "cause": "Connection to Llama Stack is broken",
- "description": "Internal Server Error"
+ "description": "Internal Server Error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ErrorResponse"
+ },
+ "example": {
+ "detail": {
+ "response": "Unable to retrieve list of providers",
+ "cause": "Connection to Llama Stack is broken"
+ }
+ }
+ }
+ }
},📝 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.
| "404": { | |
| "response": "Provider with given id not found", | |
| "description": "Not Found" | |
| }, | |
| "500": { | |
| "response": "Unable to retrieve list of providers", | |
| "cause": "Connection to Llama Stack is broken" | |
| "cause": "Connection to Llama Stack is broken", | |
| "description": "Internal Server Error" | |
| }, | |
| "404": { | |
| "description": "Not Found", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/ErrorResponse" | |
| }, | |
| "example": { | |
| "detail": { | |
| "response": "Provider with given id not found" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "500": { | |
| "description": "Internal Server Error", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/ErrorResponse" | |
| }, | |
| "example": { | |
| "detail": { | |
| "response": "Unable to retrieve list of providers", | |
| "cause": "Connection to Llama Stack is broken" | |
| } | |
| } | |
| } | |
| } | |
| }, |
🤖 Prompt for AI Agents
In docs/openapi.json around lines 299 to 307, the 404 and 500 response objects
include invalid top-level keys ("response" and "cause") that break OpenAPI
validation; remove those extraneous keys and replace them with a proper
"content" entry using application/json that references or embeds the existing
ErrorResponse schema (or an equivalent object with message/cause fields) so the
human-readable message and cause are conveyed in the JSON payload instead of as
top-level properties, and keep only allowed response fields (description,
headers, content, links).
Description
LCORE-632: updated OpenAPI Swagger
Type of change
Related Tickets & Documents
Summary by CodeRabbit