From 165983158a39a3d3f7518f633e6260caba5194e8 Mon Sep 17 00:00:00 2001 From: Mayank Date: Wed, 14 Nov 2018 19:23:00 +0530 Subject: [PATCH] Adding support for more well known types in descriptor (#809) --- protoc-gen-grpc-gateway/descriptor/types.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/protoc-gen-grpc-gateway/descriptor/types.go b/protoc-gen-grpc-gateway/descriptor/types.go index 5cf9d597fb0..ada554b53a8 100644 --- a/protoc-gen-grpc-gateway/descriptor/types.go +++ b/protoc-gen-grpc-gateway/descriptor/types.go @@ -451,7 +451,16 @@ var ( } wellKnownTypeConv = map[string]string{ - ".google.protobuf.Timestamp": "runtime.Timestamp", - ".google.protobuf.Duration": "runtime.Duration", + ".google.protobuf.Timestamp": "runtime.Timestamp", + ".google.protobuf.Duration": "runtime.Duration", + ".google.protobuf.StringValue": "runtime.StringValue", + ".google.protobuf.BytesValue": "runtime.BytesValue", + ".google.protobuf.Int32Value": "runtime.Int32Value", + ".google.protobuf.UInt32Value": "runtime.UInt32Value", + ".google.protobuf.Int64Value": "runtime.Int64Value", + ".google.protobuf.UInt64Value": "runtime.UInt64Value", + ".google.protobuf.FloatValue": "runtime.FloatValue", + ".google.protobuf.DoubleValue": "runtime.DoubleValue", + ".google.protobuf.BoolValue": "runtime.BoolValue", } )