diff --git a/internal/api/grpc/server/gateway.go b/internal/api/grpc/server/gateway.go index e5c88a652f..40b3b52e8b 100644 --- a/internal/api/grpc/server/gateway.go +++ b/internal/api/grpc/server/gateway.go @@ -13,6 +13,7 @@ import ( "github.com/caos/zitadel/internal/telemetry/tracing" "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "google.golang.org/grpc" + "google.golang.org/protobuf/encoding/protojson" ) const ( @@ -21,7 +22,11 @@ const ( ) var ( - DefaultJSONMarshaler = &runtime.JSONPb{} + DefaultJSONMarshaler = &runtime.JSONPb{ + UnmarshalOptions: protojson.UnmarshalOptions{ + DiscardUnknown: true, + }, + } DefaultServeMuxOptions = func(customHeaders ...string) []runtime.ServeMuxOption { return []runtime.ServeMuxOption{