mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-13 03:24:26 +00:00
fix: ignore unknown field in json gateway (#1619)
This commit is contained in:
parent
6863aeac59
commit
eb75ba87fb
@ -13,6 +13,7 @@ import (
|
|||||||
"github.com/caos/zitadel/internal/telemetry/tracing"
|
"github.com/caos/zitadel/internal/telemetry/tracing"
|
||||||
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
|
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
|
"google.golang.org/protobuf/encoding/protojson"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -21,7 +22,11 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
DefaultJSONMarshaler = &runtime.JSONPb{}
|
DefaultJSONMarshaler = &runtime.JSONPb{
|
||||||
|
UnmarshalOptions: protojson.UnmarshalOptions{
|
||||||
|
DiscardUnknown: true,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
DefaultServeMuxOptions = func(customHeaders ...string) []runtime.ServeMuxOption {
|
DefaultServeMuxOptions = func(customHeaders ...string) []runtime.ServeMuxOption {
|
||||||
return []runtime.ServeMuxOption{
|
return []runtime.ServeMuxOption{
|
||||||
|
Loading…
Reference in New Issue
Block a user