Skip to content

Commit

Permalink
obviously the enums should be strings
Browse files Browse the repository at this point in the history
this got overlooked from the orginal jsonpb behavior since submitter was trying to maintain behavior, but strings is way better

before
```
$ curl -X POST localhost:5050/rack -d { "env": "prod" }
{"env":1"}
```

now
```
$ curl -X POST localhost:5050/rack -d { "env": "prod" }
{"env":"prod"}
```
  • Loading branch information
zaquestion committed Aug 24, 2019
1 parent 8ef2bac commit 1f44b82
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion gengokit/httptransport/templates/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ func (h httpError) Headers() http.Header {
// the response as JSON to the response writer. Primarily useful in a server.
func EncodeHTTPGenericResponse(_ context.Context, w http.ResponseWriter, response interface{}) error {
marshaller := jsonpb.Marshaler{
EnumsAsInts: true,
EmitDefaults: false,
OrigName: true,
}
Expand Down

0 comments on commit 1f44b82

Please sign in to comment.