From e29cf7c65cca25c5074bed5833db333d0c224fe6 Mon Sep 17 00:00:00 2001 From: Alex Luong Date: Thu, 28 May 2026 21:54:14 +0700 Subject: [PATCH] fix(spec): order EventFull before EventSummary in Attempt.event oneOf MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Speakeasy's TS generator emits zod unions in declaration order. The non-strict EventSummary matched first and silently stripped event.data from the parsed attempt — losing the payload added by include=event.data. Declaring EventFull first lets it match when data is present, with EventSummary as the fallback. Co-Authored-By: Claude Opus 4.7 (1M context) --- docs/apis/openapi.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/apis/openapi.yaml b/docs/apis/openapi.yaml index 0832890e4..c3c6915fd 100644 --- a/docs/apis/openapi.yaml +++ b/docs/apis/openapi.yaml @@ -2535,8 +2535,8 @@ components: event: nullable: true oneOf: - - $ref: "#/components/schemas/EventSummary" - $ref: "#/components/schemas/EventFull" + - $ref: "#/components/schemas/EventSummary" description: The associated event object. Only present when include=event or include=event.data. destination: nullable: true