Skip to content

Commit 1b415e9

Browse files
authored
gapic: REST - remove EmitUnpopulated encoding option (#702)
1 parent 1012c0d commit 1b415e9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/gengapic/genrest.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ func (g *generator) emptyUnaryRESTCall(servName string, m *descriptor.MethodDesc
638638
if verb == http.MethodGet || verb == http.MethodDelete {
639639
return fmt.Errorf("invalid use of body parameter for a get/delete method %q", m.GetName())
640640
}
641-
p("m := protojson.MarshalOptions{AllowPartial: true, EmitUnpopulated: true, UseProtoNames: false}")
641+
p("m := protojson.MarshalOptions{AllowPartial: true, UseProtoNames: false}")
642642
requestObject := "req"
643643
if info.body != "*" {
644644
requestObject = "body"
@@ -735,7 +735,7 @@ func (g *generator) unaryRESTCall(servName string, m *descriptor.MethodDescripto
735735
if verb == http.MethodGet || verb == http.MethodDelete {
736736
return fmt.Errorf("invalid use of body parameter for a get/delete method %q", m.GetName())
737737
}
738-
p("m := protojson.MarshalOptions{AllowPartial: true, EmitUnpopulated: true}")
738+
p("m := protojson.MarshalOptions{AllowPartial: true}")
739739
requestObject := "req"
740740
if info.body != "*" {
741741
requestObject = "body"

0 commit comments

Comments
 (0)