You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(feishu): replace empty Type.Any() with non-empty FlexibleValue in bitable schemas
- Type.Any() and Type.Unknown() serialize to {} in TypeBox 1.1.x, producing
empty patternProperties sub-schemas that AWS Bedrock rejects
- Replace with Type.Unsafe<unknown>({description: ...}) that generates a
non-empty JSON Schema while still accepting any JSON-compatible value
- Applied to create_record fields, update_record fields, and create_field
property schemas
Fixes#94547
record_id: Type.String({description: "Record ID to retrieve"}),
526
526
});
527
527
528
+
// FIX #94547: Type.Any() / Type.Unknown() serialize to {} in TypeBox 1.1.x,
529
+
// producing an empty sub-schema that AWS Bedrock rejects. Use a non-empty
530
+
// flexible-value schema that accepts any JSON-compatible value.
531
+
constFlexibleValue=Type.Unsafe<unknown>({
532
+
description: "Any JSON-compatible value (string, number, boolean, array, or object)",
533
+
});
534
+
528
535
constCreateRecordSchema=Type.Object({
529
536
app_token: Type.String({
530
537
description: "Bitable app token (use feishu_bitable_get_meta to get from URL)",
531
538
}),
532
539
table_id: Type.String({description: "Table ID (from URL: ?table=YYY)"}),
533
-
fields: Type.Record(Type.String(),Type.Any(),{
540
+
fields: Type.Record(Type.String(),FlexibleValue,{
534
541
description:
535
542
"Field values keyed by field name. Format by type: Text='string', Number=123, SingleSelect='Option', MultiSelect=['A','B'], DateTime=timestamp_ms, User=[{id:'ou_xxx'}], URL={text:'Display',link:'https://...'}",
0 commit comments