Skip to content

Commit

Permalink
Change comment for useJSONNamesForFields (part 2)
Browse files Browse the repository at this point in the history
  • Loading branch information
doroginin committed Aug 11, 2018
1 parent bf36dca commit e44e19d
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions protoc-gen-grpc-gateway/descriptor/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,8 @@ type Registry struct {
allowRepeatedFieldsInBody bool

// useJSONNamesForFields if true json tag name is used for generating fields in swagger definitions,
// otherwise original proto name is used. It's helpful for synchronization swagger definition with grpc-gateway
// response, if it uses json tags for marshaling.
// Pay attention. By default grpc-gataway uses original proto name in responses. If you would like
// to use names from json tags change marshaller for gateway with runtime.ServeMuxOption
// runtime.WithMarshalerOption(runtime.MIMEWildcard, &runtime.JSONPb{OrigName: false})
// otherwise the original proto name is used. It's helpful for synchronizing the swagger definition
// with grpc-gateway response, if it uses json tags for marshaling.
useJSONNamesForFields bool
}

Expand Down

0 comments on commit e44e19d

Please sign in to comment.