From 299812b3ee4876367b448a5417be8c3fcc7f1f29 Mon Sep 17 00:00:00 2001 From: Samantha Coyle Date: Fri, 15 May 2026 14:37:37 -0500 Subject: [PATCH] fix: use protojson camelcase default for wf payload serialization Signed-off-by: Samantha Coyle --- api/orchestration.go | 5 +++-- task/executor.go | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/api/orchestration.go b/api/orchestration.go index 5e78cf98..e707105b 100644 --- a/api/orchestration.go +++ b/api/orchestration.go @@ -198,8 +198,9 @@ func WithRerunInput(input any) RerunOptions { } } -// protoMarshaler uses UseProtoNames so JSON output uses snake_case field names. -var protoMarshaler = protojson.MarshalOptions{UseProtoNames: true} +// protoMarshaler uses default protojson options so JSON output uses camelCase +// field names (the protojson default). +var protoMarshaler = protojson.MarshalOptions{} // marshalData serializes v to JSON. Proto message types use protojson for // correct handling of well-known types (e.g. google.protobuf.Struct); diff --git a/task/executor.go b/task/executor.go index c40ff410..0d79cbf9 100644 --- a/task/executor.go +++ b/task/executor.go @@ -187,9 +187,9 @@ func (te taskExecutor) Shutdown(ctx context.Context) error { return nil } -// protoMarshaler uses UseProtoNames so JSON output uses snake_case field names -// (matching the proto field names), which is the convention for workflow payloads. -var protoMarshaler = protojson.MarshalOptions{UseProtoNames: true} +// protoMarshaler uses default protojson options so JSON output uses camelCase +// field names (the protojson default). +var protoMarshaler = protojson.MarshalOptions{} func unmarshalData(data []byte, v any) error { if v == nil {