fix(controlplane): mark arbitrary-JSON object fields as open maps in OpenAPI spec - #2737
Merged
Merged
Conversation
a bare {type: object} with no properties/additionalProperties is a
closed empty object; strict SDK generators (zod in the typescript
client) generate schemas that strip every key from such payloads, so
event data round-tripped through the SDK serialized as {}.
add a doc-gen pass that sets additionalProperties: true on
json.RawMessage-backed fields (event data, metadata data, json_schema)
and regenerate docs/.
|
Current version of PR was reviewed by /review-bugbot on Jul 19, 21:32 GMT+1. It flagged 0 findings. Bugbot on commit |
1 task
This was referenced Jul 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #2736. That PR fixed
json.RawMessagefields from integer arrays totype: object, but a bare{type: object}with noproperties/additionalPropertiesis a closed empty object. Strict SDK generators produce key-stripping schemas from it — the TypeScript client's zod schema serialized every eventdatapayload as{}:docs/fix_openapi_spec.shgains a doc-gen pass that setsadditionalProperties: trueon bare-object properties (eventdata, metadatadata,json_schema, bulk-filter bodies). Typed maps likecustom_headers(additionalProperties: {type: string}) are untouched.docs/.Test plan
make generate_docsclean;openapi spec validatepassesadditionalProperties: true; typed maps unchanged;handlers.Stub(whole-definition stub) unchangedz.object({})strips all keys)