Skip to content

Commit 2643ce5

Browse files
committed
fix(mcp): render closed empty objects as Record<string, never>
1 parent 901c868 commit 2643ce5

2 files changed

Lines changed: 218 additions & 217 deletions

File tree

‎apps/sim/lib/api/contracts/typescript.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ function toTypeScript(schema: JsonSchema, indent: number, refs?: Map<string, str
8383
const keys = Object.keys(properties)
8484

8585
if (keys.length === 0) {
86+
if (schema.additionalProperties === false) return 'Record<string, never>'
8687
const value = isRecordLike(schema.additionalProperties)
8788
? toTypeScript(schema.additionalProperties, indent, refs)
8889
: 'unknown'

0 commit comments

Comments
 (0)