Skip to content

fix(codegen): additionalProperties true or {} keeps an object open - #649

Merged
leemour merged 1 commit into
mainfrom
fix/fake-open-object
Nov 18, 2026
Merged

leemour merged 1 commit into
mainfrom
fix/fake-open-object

Conversation

@leemour

@leemour leemour commented Nov 18, 2026

Copy link
Copy Markdown
Member

Why

Attio's spec gives the records query filter as {type: object, additionalProperties: true}. adaptOpenApi dropped that, so fakeApi refused filter.$or as "no such field". attio-cli's test of people list <words> could not run against the strict fake.

What

additionalProperties: true or {} becomes additionalProperties: {type: unknown}. A closed object (false) or one that says nothing stays as before. Generated types for such objects gain an index signature.

Testing

vitest run src/codegen (163 passed), lint, typecheck, docs:check.

🤖 Generated with Claude Code

adaptOpenApi dropped an empty additionalProperties, so fakeApi refused every field of an object the spec leaves open,
such as Attio's records filter and its $or, as "no such field". It is now kept as any value.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@leemour
leemour merged commit ccc3fa1 into main Nov 18, 2026
10 checks passed
@leemour
leemour deleted the fix/fake-open-object branch November 18, 2026 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant