-
Notifications
You must be signed in to change notification settings - Fork 5
Update api spec #1433
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
base: main
Are you sure you want to change the base?
Update api spec #1433
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1433 +/- ##
=======================================
Coverage 69.44% 69.44%
=======================================
Files 41 41
Lines 6818 6818
=======================================
Hits 4735 4735
Misses 2083 2083
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| "files": { | ||
| "type": "object", | ||
| "properties": { | ||
| "files": { | ||
| "description": "The list of files being sent.", | ||
| "type": "array", | ||
| "items": { | ||
| "$ref": "#/components/schemas/MlCopilotFile" | ||
| } | ||
| } | ||
| }, | ||
| "required": [ | ||
| "files" | ||
| ] | ||
| } |
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.
The server-to-client file structure has an unnecessary nested files object, creating a files.files path instead of just files. This is inconsistent with the client-to-server structure (lines 31642-31648) which directly contains a files array.
This will cause integration issues where:
- Client-to-server uses:
{ files: [MlCopilotFile, ...], type: "files" } - Server-to-client uses:
{ files: { files: [MlCopilotFile, ...] } }
Clients expecting symmetrical structure will fail to access files with response.files[0] when they need response.files.files[0].
Fix: Remove the nested object wrapper:
"files": {
"description": "The list of files being sent.",
"type": "array",
"items": {
"$ref": "#/components/schemas/MlCopilotFile"
}
}| "files": { | |
| "type": "object", | |
| "properties": { | |
| "files": { | |
| "description": "The list of files being sent.", | |
| "type": "array", | |
| "items": { | |
| "$ref": "#/components/schemas/MlCopilotFile" | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "files" | |
| ] | |
| } | |
| "files": { | |
| "description": "The list of files being sent.", | |
| "type": "array", | |
| "items": { | |
| "$ref": "#/components/schemas/MlCopilotFile" | |
| } | |
| } |
Spotted by Graphite Agent
Is this helpful? React 👍 or 👎 to let us know.
Updating the spec from that in the api repo