LCORE-1218: updated config and OpenAPI docs#1120
LCORE-1218: updated config and OpenAPI docs#1120tisnik merged 2 commits intolightspeed-core:mainfrom
Conversation
WalkthroughDocumentation and schema files were updated with refined descriptions for configuration fields, stricter URL validation constraints (URI format and minLength requirements), and expanded error schema definitions with new context fields. 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. ✨ 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.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@docs/openapi.json`:
- Around line 6976-6988: The schema for the property titled "Llama Stack URL"
currently allows any URI scheme via "format": "uri" but the description requires
only HTTP/HTTPS; update the schema for "Llama Stack URL" to enforce HTTP/HTTPS
(while still allowing null) by adding a scheme constraint such as a pattern like
^https?:// or an enum/oneOf that limits schemes to http and https (keep the
anyOf null branch intact); modify the schema near the "title": "Llama Stack URL"
entry so validation rejects non-HTTP schemes.
| "anyOf": [ | ||
| { | ||
| "type": "string" | ||
| "type": "string", | ||
| "minLength": 1, | ||
| "format": "uri" | ||
| }, | ||
| { | ||
| "type": "null" | ||
| } | ||
| ], | ||
| "title": "Llama Stack URL", | ||
| "description": "URL to Llama Stack service; used when library mode is disabled" | ||
| "description": "URL to Llama Stack service; used when library mode is disabled. Must be a valid HTTP or HTTPS URL." | ||
| }, |
There was a problem hiding this comment.
Schema doesn’t enforce HTTP/HTTPS despite the description.
The description says HTTP/HTTPS only, but format: uri allows any scheme. This can let non-HTTP URLs pass schema validation. Consider constraining the scheme to match the description.
🛠️ Suggested schema tightening
"url": {
"anyOf": [
{
"type": "string",
"minLength": 1,
- "format": "uri"
+ "format": "uri",
+ "pattern": "^https?://"
},
{
"type": "null"
}
],🤖 Prompt for AI Agents
In `@docs/openapi.json` around lines 6976 - 6988, The schema for the property
titled "Llama Stack URL" currently allows any URI scheme via "format": "uri" but
the description requires only HTTP/HTTPS; update the schema for "Llama Stack
URL" to enforce HTTP/HTTPS (while still allowing null) by adding a scheme
constraint such as a pattern like ^https?:// or an enum/oneOf that limits
schemes to http and https (keep the anyOf null branch intact); modify the schema
near the "title": "Llama Stack URL" entry so validation rejects non-HTTP
schemes.
Description
LCORE-1218: updated config and OpenAPI docs
Type of change
Tools used to create PR
Related Tickets & Documents
Summary by CodeRabbit
Documentation
New Features
ConversationTurnandMessagemodels to the API.Improvements