fix(schema): preserve sibling properties when resolving
This commit is contained in:
parent
1838ab019b
commit
375c629f28
@ -198,11 +198,13 @@ function cleanSchemaForGeminiWithDefs(
|
||||
const result: Record<string, unknown> = {
|
||||
...(cleaned as Record<string, unknown>),
|
||||
};
|
||||
for (const key of ["description", "title", "default"]) {
|
||||
if (key in obj && obj[key] !== undefined) {
|
||||
result[key] = obj[key];
|
||||
}
|
||||
}
|
||||
// Preserve all sibling properties except "$ref"
|
||||
for (const [key, value] of Object.entries(obj)) {
|
||||
if (key !== "$ref" && value !== undefined) {
|
||||
result[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user