Skip to content

fix(controlplane): mark arbitrary-JSON object fields as open maps in OpenAPI spec - #2737

Merged
mekilis merged 1 commit into
mainfrom
oksmart/open-object-additional-properties
Jul 19, 2026
Merged

fix(controlplane): mark arbitrary-JSON object fields as open maps in OpenAPI spec#2737
mekilis merged 1 commit into
mainfrom
oksmart/open-object-additional-properties

Conversation

@mekilis

@mekilis mekilis commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #2736. That PR fixed json.RawMessage fields from integer arrays to type: object, but a bare {type: object} with no properties/additionalProperties is a closed empty object. Strict SDK generators produce key-stripping schemas from it — the TypeScript client's zod schema serialized every event data payload as {}:

modelsCreateEventToJSON({ data: { amount: 100 }, ... })
// => {"data":{},"endpoint_id":"ep1","event_type":"invoice.paid"}
  • docs/fix_openapi_spec.sh gains a doc-gen pass that sets additionalProperties: true on bare-object properties (event data, metadata data, json_schema, bulk-filter bodies). Typed maps like custom_headers (additionalProperties: {type: string}) are untouched.
  • Regenerated docs/.

Test plan

  • make generate_docs clean; openapi spec validate passes
  • Spec audit: all arbitrary-JSON fields now additionalProperties: true; typed maps unchanged; handlers.Stub (whole-definition stub) unchanged
  • Empirically confirmed the key-stripping on the current TS client build (zod z.object({}) strips all keys)

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/.
@cursor

cursor Bot commented Jul 19, 2026

Copy link
Copy Markdown

Current version of PR was reviewed by /review-bugbot on Jul 19, 21:32 GMT+1. It flagged 0 findings.

Bugbot on commit 1faad17 is skipped.

@mekilis
mekilis merged commit abb4910 into main Jul 19, 2026
28 checks passed
@mekilis
mekilis deleted the oksmart/open-object-additional-properties branch July 19, 2026 20:36
mekilis added a commit that referenced this pull request Jul 19, 2026
python generation moved to openapi-python-client after the speakeasy
free-tier limit (one generated SDK per workspace; convoy.js holds the
slot). document the dispatcher contract (sdk_generation.yaml filename +
inputs), the spec fidelity rules from #2736/#2737, and the switch-back
path.
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