From d6d2b6829750882d6ae1ee5c258a780cec3d824d Mon Sep 17 00:00:00 2001 From: Safeer Jiwan Date: Fri, 19 Jul 2024 14:51:14 -0700 Subject: [PATCH] fix: ignore unknown ingress fields (#2120) Fixes #2117 #2119 --- go-runtime/encoding/encoding.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/go-runtime/encoding/encoding.go b/go-runtime/encoding/encoding.go index f35098b008..32076e350f 100644 --- a/go-runtime/encoding/encoding.go +++ b/go-runtime/encoding/encoding.go @@ -319,7 +319,8 @@ func decodeStruct(d *json.Decoder, v reflect.Value) error { return strcase.ToLowerCamel(s) == key }) if !field.IsValid() { - return fmt.Errorf("no field corresponding to key %s", key) + // Issue #2117 #2119: ignore unknown fields + continue } fieldTypeStr := field.Type().String() switch {