Skip to content
This repository was archived by the owner on Feb 4, 2021. It is now read-only.

Commit 91a7d80

Browse files
committed
Add Marshaler option
1 parent 45616b4 commit 91a7d80

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

app/run.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package app
22

33
import (
4+
"github.com/grpc-ecosystem/grpc-gateway/runtime"
45
"github.com/izumin5210/grapi/pkg/grapiserver"
56
"github.com/labstack/gommon/log"
67
"github.com/volatiletech/sqlboiler/boil"
@@ -37,6 +38,9 @@ func Run() error {
3738

3839
s := grapiserver.New(
3940
grapiserver.WithDefaultLogger(),
41+
grapiserver.WithGatewayMuxOptions(
42+
runtime.WithMarshalerOption(runtime.MIMEWildcard, &runtime.JSONPb{OrigName: true, EmitDefaults: true}),
43+
),
4044
grapiserver.WithGrpcServerUnaryInterceptors(
4145
authorizator.UnaryServerInterceptor(),
4246
),

0 commit comments

Comments
 (0)