utrack / clay

Proto-first minimal server platform for gRPС+REST+Swagger APIs
MIT License
290 stars 37 forks source link

Add emitting default values support in JSON #84

Open wish-master opened 4 years ago

wish-master commented 4 years ago

It will be great if I can paste some flag to generator which pass EmitDefaults value in default marshaler. This option is well discussed in that thread: https://github.com/grpc-ecosystem/grpc-gateway/issues/233 I suppose to make it optional with false as default value not to change current behavior. I'm talking about flag exactly, not to develop some custom httpruntime.Marshaler implementation and injection... If @utrack will be agree, I'll implement this feature.

bullgare commented 4 years ago

I'd be interested in this feature as well.

utrack commented 4 years ago

It's a great idea, I believe :) I'm all for it if you'll manage to override marshaler settings per-handler, without breaking global injection.