diff --git a/README.md b/README.md index c7396cc154b..5d86a5addc5 100644 --- a/README.md +++ b/README.md @@ -216,7 +216,6 @@ To use the same port for custom HTTP handlers (e.g. serving `swagger.json`), gRP ### Want to support But not yet. -* bytes fields in path parameter. #5 * Optionally generating the entrypoint. #8 * `import_path` parameter diff --git a/examples/clients/abe/a_bit_of_everything_service_api.go b/examples/clients/abe/a_bit_of_everything_service_api.go index a9cf948d7ae..13c637b9737 100644 --- a/examples/clients/abe/a_bit_of_everything_service_api.go +++ b/examples/clients/abe/a_bit_of_everything_service_api.go @@ -581,7 +581,8 @@ func (a ABitOfEverythingServiceApi) GetMessageWithBody(id string, body Examplepb * @param fixed32Value * @param boolValue * @param stringValue - * @param uint32Value TODO(yugui) add bytes_value. + * @param bytesValue + * @param uint32Value * @param enumValue - ZERO: ZERO means 0 - ONE: ONE means 1 * @param sfixed32Value * @param sfixed64Value @@ -594,7 +595,7 @@ func (a ABitOfEverythingServiceApi) GetMessageWithBody(id string, body Examplepb * @param repeatedEnumValue repeated enum value. it is comma-separated in query. - ZERO: ZERO means 0 - ONE: ONE means 1 * @return *ProtobufEmpty */ -func (a ABitOfEverythingServiceApi) GetQuery(uuid string, singleNestedName string, singleNestedAmount int64, singleNestedOk string, floatValue float32, doubleValue float64, int64Value string, uint64Value string, int32Value int32, fixed64Value string, fixed32Value int64, boolValue bool, stringValue string, uint32Value int64, enumValue string, sfixed32Value int32, sfixed64Value string, sint32Value int32, sint64Value string, repeatedStringValue []string, oneofString string, nonConventionalNameValue string, timestampValue time.Time, repeatedEnumValue []string) (*ProtobufEmpty, *APIResponse, error) { +func (a ABitOfEverythingServiceApi) GetQuery(uuid string, singleNestedName string, singleNestedAmount int64, singleNestedOk string, floatValue float32, doubleValue float64, int64Value string, uint64Value string, int32Value int32, fixed64Value string, fixed32Value int64, boolValue bool, stringValue string, bytesValue string, uint32Value int64, enumValue string, sfixed32Value int32, sfixed64Value string, sint32Value int32, sint64Value string, repeatedStringValue []string, oneofString string, nonConventionalNameValue string, timestampValue time.Time, repeatedEnumValue []string) (*ProtobufEmpty, *APIResponse, error) { var localVarHttpMethod = strings.ToUpper("Get") // create path and map variables @@ -623,6 +624,7 @@ func (a ABitOfEverythingServiceApi) GetQuery(uuid string, singleNestedName strin localVarQueryParams.Add("fixed32_value", a.Configuration.APIClient.ParameterToString(fixed32Value, "")) localVarQueryParams.Add("bool_value", a.Configuration.APIClient.ParameterToString(boolValue, "")) localVarQueryParams.Add("string_value", a.Configuration.APIClient.ParameterToString(stringValue, "")) + localVarQueryParams.Add("bytes_value", a.Configuration.APIClient.ParameterToString(bytesValue, "")) localVarQueryParams.Add("uint32_value", a.Configuration.APIClient.ParameterToString(uint32Value, "")) localVarQueryParams.Add("enum_value", a.Configuration.APIClient.ParameterToString(enumValue, "")) localVarQueryParams.Add("sfixed32_value", a.Configuration.APIClient.ParameterToString(sfixed32Value, "")) diff --git a/examples/clients/abe/examplepb_a_bit_of_everything.go b/examples/clients/abe/examplepb_a_bit_of_everything.go index d8775d9c863..cb6fb3a487d 100644 --- a/examples/clients/abe/examplepb_a_bit_of_everything.go +++ b/examples/clients/abe/examplepb_a_bit_of_everything.go @@ -40,6 +40,8 @@ type ExamplepbABitOfEverything struct { StringValue string `json:"string_value,omitempty"` + BytesValue string `json:"bytes_value,omitempty"` + Uint32Value int64 `json:"uint32_value,omitempty"` EnumValue ExamplepbNumericEnum `json:"enum_value,omitempty"` diff --git a/examples/examplepb/a_bit_of_everything.pb.go b/examples/examplepb/a_bit_of_everything.pb.go index 7ac85fc900d..ed65af9d794 100644 --- a/examples/examplepb/a_bit_of_everything.pb.go +++ b/examples/examplepb/a_bit_of_everything.pb.go @@ -75,28 +75,28 @@ func (ABitOfEverything_Nested_DeepEnum) EnumDescriptor() ([]byte, []int) { } // Intentionaly complicated message type to cover much features of Protobuf. -// NEXT ID: 27 +// NEXT ID: 30 type ABitOfEverything struct { - SingleNested *ABitOfEverything_Nested `protobuf:"bytes,25,opt,name=single_nested,json=singleNested" json:"single_nested,omitempty"` - Uuid string `protobuf:"bytes,1,opt,name=uuid" json:"uuid,omitempty"` - Nested []*ABitOfEverything_Nested `protobuf:"bytes,2,rep,name=nested" json:"nested,omitempty"` - FloatValue float32 `protobuf:"fixed32,3,opt,name=float_value,json=floatValue" json:"float_value,omitempty"` - DoubleValue float64 `protobuf:"fixed64,4,opt,name=double_value,json=doubleValue" json:"double_value,omitempty"` - Int64Value int64 `protobuf:"varint,5,opt,name=int64_value,json=int64Value" json:"int64_value,omitempty"` - Uint64Value uint64 `protobuf:"varint,6,opt,name=uint64_value,json=uint64Value" json:"uint64_value,omitempty"` - Int32Value int32 `protobuf:"varint,7,opt,name=int32_value,json=int32Value" json:"int32_value,omitempty"` - Fixed64Value uint64 `protobuf:"fixed64,8,opt,name=fixed64_value,json=fixed64Value" json:"fixed64_value,omitempty"` - Fixed32Value uint32 `protobuf:"fixed32,9,opt,name=fixed32_value,json=fixed32Value" json:"fixed32_value,omitempty"` - BoolValue bool `protobuf:"varint,10,opt,name=bool_value,json=boolValue" json:"bool_value,omitempty"` - StringValue string `protobuf:"bytes,11,opt,name=string_value,json=stringValue" json:"string_value,omitempty"` - // TODO(yugui) add bytes_value - Uint32Value uint32 `protobuf:"varint,13,opt,name=uint32_value,json=uint32Value" json:"uint32_value,omitempty"` - EnumValue NumericEnum `protobuf:"varint,14,opt,name=enum_value,json=enumValue,enum=grpc.gateway.examples.examplepb.NumericEnum" json:"enum_value,omitempty"` - Sfixed32Value int32 `protobuf:"fixed32,15,opt,name=sfixed32_value,json=sfixed32Value" json:"sfixed32_value,omitempty"` - Sfixed64Value int64 `protobuf:"fixed64,16,opt,name=sfixed64_value,json=sfixed64Value" json:"sfixed64_value,omitempty"` - Sint32Value int32 `protobuf:"zigzag32,17,opt,name=sint32_value,json=sint32Value" json:"sint32_value,omitempty"` - Sint64Value int64 `protobuf:"zigzag64,18,opt,name=sint64_value,json=sint64Value" json:"sint64_value,omitempty"` - RepeatedStringValue []string `protobuf:"bytes,19,rep,name=repeated_string_value,json=repeatedStringValue" json:"repeated_string_value,omitempty"` + SingleNested *ABitOfEverything_Nested `protobuf:"bytes,25,opt,name=single_nested,json=singleNested" json:"single_nested,omitempty"` + Uuid string `protobuf:"bytes,1,opt,name=uuid" json:"uuid,omitempty"` + Nested []*ABitOfEverything_Nested `protobuf:"bytes,2,rep,name=nested" json:"nested,omitempty"` + FloatValue float32 `protobuf:"fixed32,3,opt,name=float_value,json=floatValue" json:"float_value,omitempty"` + DoubleValue float64 `protobuf:"fixed64,4,opt,name=double_value,json=doubleValue" json:"double_value,omitempty"` + Int64Value int64 `protobuf:"varint,5,opt,name=int64_value,json=int64Value" json:"int64_value,omitempty"` + Uint64Value uint64 `protobuf:"varint,6,opt,name=uint64_value,json=uint64Value" json:"uint64_value,omitempty"` + Int32Value int32 `protobuf:"varint,7,opt,name=int32_value,json=int32Value" json:"int32_value,omitempty"` + Fixed64Value uint64 `protobuf:"fixed64,8,opt,name=fixed64_value,json=fixed64Value" json:"fixed64_value,omitempty"` + Fixed32Value uint32 `protobuf:"fixed32,9,opt,name=fixed32_value,json=fixed32Value" json:"fixed32_value,omitempty"` + BoolValue bool `protobuf:"varint,10,opt,name=bool_value,json=boolValue" json:"bool_value,omitempty"` + StringValue string `protobuf:"bytes,11,opt,name=string_value,json=stringValue" json:"string_value,omitempty"` + BytesValue []byte `protobuf:"bytes,29,opt,name=bytes_value,json=bytesValue,proto3" json:"bytes_value,omitempty"` + Uint32Value uint32 `protobuf:"varint,13,opt,name=uint32_value,json=uint32Value" json:"uint32_value,omitempty"` + EnumValue NumericEnum `protobuf:"varint,14,opt,name=enum_value,json=enumValue,enum=grpc.gateway.examples.examplepb.NumericEnum" json:"enum_value,omitempty"` + Sfixed32Value int32 `protobuf:"fixed32,15,opt,name=sfixed32_value,json=sfixed32Value" json:"sfixed32_value,omitempty"` + Sfixed64Value int64 `protobuf:"fixed64,16,opt,name=sfixed64_value,json=sfixed64Value" json:"sfixed64_value,omitempty"` + Sint32Value int32 `protobuf:"zigzag32,17,opt,name=sint32_value,json=sint32Value" json:"sint32_value,omitempty"` + Sint64Value int64 `protobuf:"zigzag64,18,opt,name=sint64_value,json=sint64Value" json:"sint64_value,omitempty"` + RepeatedStringValue []string `protobuf:"bytes,19,rep,name=repeated_string_value,json=repeatedStringValue" json:"repeated_string_value,omitempty"` // Types that are valid to be assigned to OneofValue: // *ABitOfEverything_OneofEmpty // *ABitOfEverything_OneofString @@ -220,6 +220,13 @@ func (m *ABitOfEverything) GetStringValue() string { return "" } +func (m *ABitOfEverything) GetBytesValue() []byte { + if m != nil { + return m.BytesValue + } + return nil +} + func (m *ABitOfEverything) GetUint32Value() uint32 { if m != nil { return m.Uint32Value @@ -961,110 +968,111 @@ var _AnotherServiceWithNoBindings_serviceDesc = grpc.ServiceDesc{ func init() { proto.RegisterFile("examples/examplepb/a_bit_of_everything.proto", fileDescriptor1) } var fileDescriptor1 = []byte{ - // 1671 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0x4d, 0x6f, 0xdb, 0xc8, - 0x19, 0xf6, 0x50, 0x8a, 0x62, 0xbd, 0xf2, 0x87, 0x32, 0x4e, 0x1c, 0x45, 0x49, 0xeb, 0x89, 0x76, - 0xb7, 0x25, 0xdc, 0x88, 0xdc, 0x28, 0x8b, 0x62, 0x23, 0xa0, 0xdd, 0xca, 0xb1, 0x92, 0x2c, 0xba, - 0x71, 0x12, 0x66, 0x37, 0x0d, 0xdc, 0x6c, 0x0d, 0x4a, 0x1c, 0x49, 0x5c, 0x8b, 0x1c, 0x96, 0x1c, - 0xda, 0x16, 0x54, 0xf5, 0xd0, 0x43, 0x8b, 0xbd, 0xba, 0xb7, 0x02, 0xdd, 0x4b, 0x81, 0xa2, 0x05, - 0xda, 0x63, 0x4f, 0x3d, 0xf4, 0x47, 0xb4, 0x7f, 0xa0, 0x40, 0x7f, 0x48, 0xc1, 0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 0x51, 0xba, 0x41, 0x90, 0x5c, 0xa8, 0x7d, 0xac, 0xcc, 0x09, 0x98, 0x32, 0x89, - 0xa4, 0xec, 0x09, 0x7d, 0x6d, 0x25, 0x84, 0x0b, 0x57, 0x18, 0x43, 0xd6, 0xf7, 0x4d, 0xa3, 0x84, - 0x08, 0x92, 0xf3, 0x9a, 0xf8, 0xc6, 0xcf, 0x20, 0x17, 0x71, 0x49, 0x24, 0xf3, 0x56, 0x5c, 0x11, - 0x0e, 0xde, 0x82, 0x42, 0xa7, 0xcf, 0x74, 0x7e, 0x70, 0xa4, 0xf7, 0x7d, 0x5a, 0xca, 0x10, 0x24, - 0x4b, 0x1a, 0x88, 0xad, 0x97, 0xc1, 0x0e, 0xbe, 0x0d, 0x2b, 0x06, 0xf3, 0x5b, 0x7d, 0x1a, 0x49, - 0x64, 0x09, 0x92, 0x91, 0x56, 0x08, 0xf7, 0x42, 0x91, 0x2d, 0x28, 0x98, 0x36, 0xff, 0xe1, 0x47, - 0x91, 0xc4, 0x25, 0x82, 0xe4, 0x8c, 0x06, 0x62, 0x2b, 0xc1, 0xf0, 0xd3, 0x12, 0x39, 0x82, 0xe4, - 0xac, 0x56, 0xf0, 0x53, 0x22, 0x21, 0xc6, 0xbd, 0x5a, 0x24, 0x71, 0x99, 0x20, 0xf9, 0x92, 0xc0, - 0xb8, 0x57, 0x0b, 0x05, 0xde, 0x83, 0xd5, 0x8e, 0x79, 0x42, 0x8d, 0x04, 0x64, 0x99, 0x20, 0x39, - 0xa7, 0xad, 0x44, 0x9b, 0xe3, 0x42, 0x09, 0x4e, 0x9e, 0x20, 0xf9, 0x72, 0x24, 0x14, 0x23, 0x7d, - 0x07, 0xa0, 0xc5, 0x58, 0x3f, 0x92, 0x00, 0x82, 0xe4, 0x65, 0x2d, 0x1f, 0xec, 0x24, 0xc6, 0x7a, - 0xdc, 0x35, 0xed, 0x6e, 0x24, 0x50, 0x10, 0xf1, 0x2f, 0x84, 0x7b, 0x63, 0xfe, 0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- 0x2a, 0x9d, 0x36, 0xfe, 0x20, 0x61, 0x0e, 0x1b, 0x0d, 0xb2, 0x63, 0xf2, 0xc0, 0xc1, 0x54, 0x95, - 0xbe, 0x82, 0xab, 0x5d, 0xed, 0xd9, 0x83, 0xea, 0xa3, 0xd0, 0x1a, 0xe2, 0xb8, 0xec, 0x2b, 0xda, - 0xe6, 0x8b, 0x7a, 0x51, 0x2e, 0xda, 0xcc, 0xa6, 0x3f, 0x89, 0x32, 0x15, 0x48, 0xd7, 0x32, 0x77, - 0x95, 0x0f, 0xb7, 0x33, 0x48, 0xca, 0xd6, 0x8a, 0xba, 0xe3, 0xf4, 0xcd, 0xb6, 0x08, 0xa5, 0xfa, - 0x95, 0xc7, 0xec, 0xda, 0x66, 0x7a, 0xe7, 0xa4, 0xda, 0x61, 0xac, 0x6a, 0x99, 0x16, 0xad, 0x4f, - 0x49, 0xd6, 0x67, 0x48, 0xba, 0x9f, 0xc2, 0xf5, 0x27, 0x67, 0xf1, 0x4f, 0xbb, 0xb0, 0xa8, 0xe9, - 0xfb, 0xf9, 0xa4, 0x3c, 0x5b, 0x39, 0x11, 0xbd, 0x7b, 0xff, 0x0f, 0x00, 0x00, 0xff, 0xff, 0xd7, - 0x0d, 0x07, 0x7a, 0xd9, 0x13, 0x00, 0x00, + // 1686 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0x4f, 0x6f, 0xdb, 0xc8, + 0x15, 0xf7, 0x50, 0x8e, 0x62, 0x3d, 0xf9, 0x8f, 0x32, 0x4e, 0x1c, 0x45, 0xc9, 0xd6, 0x13, 0xed, + 0x6e, 0x4b, 0xb8, 0x31, 0xb9, 0x51, 0x16, 0xc5, 0x46, 0x40, 0xbb, 0x95, 0x63, 0x25, 0x59, 0x74, + 0xe3, 0x24, 0xcc, 0x6e, 0x1a, 0xa4, 0xd9, 0x1a, 0x94, 0x38, 0x92, 0xb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xbb, 0xd4, 0xd7, 0x99, 0x27, 0x0c, 0x9f, 0x76, 0xa2, 0xfa, 0x8f, 0x12, 0x94, 0x1a, 0x7b, + 0x36, 0x7f, 0xd8, 0x69, 0xa6, 0xe1, 0xc1, 0x5f, 0xc1, 0x5a, 0x60, 0xbb, 0xdd, 0x3e, 0x3d, 0x74, + 0x69, 0xc0, 0xa9, 0x55, 0xbe, 0x42, 0x90, 0x5a, 0xac, 0x7d, 0xa2, 0xcd, 0x09, 0x98, 0x36, 0xc9, + 0xa4, 0x1d, 0x08, 0x79, 0x63, 0x35, 0xa6, 0x8b, 0x57, 0x18, 0xc3, 0x72, 0x18, 0xda, 0x56, 0x19, + 0x11, 0xa4, 0x16, 0x0c, 0xf1, 0x8d, 0x1f, 0x41, 0x5e, 0xea, 0x52, 0x48, 0xee, 0xad, 0x74, 0x49, + 0x1e, 0xbc, 0x0d, 0xc5, 0x4e, 0x9f, 0x99, 0xfc, 0xf0, 0xc8, 0xec, 0x87, 0xb4, 0x9c, 0x23, 0x48, + 0x55, 0x0c, 0x10, 0x5b, 0x4f, 0xa3, 0x1d, 0x7c, 0x1d, 0x56, 0x2d, 0x16, 0xb6, 0xfa, 0x54, 0x22, + 0x96, 0x09, 0x52, 0x91, 0x51, 0x8c, 0xf7, 0x62, 0xc8, 0x36, 0x14, 0x6d, 0x97, 0xff, 0xe0, 0x63, + 0x89, 0x38, 0x47, 0x90, 0x9a, 0x33, 0x40, 0x6c, 0xa5, 0x1c, 0x61, 0x16, 0x91, 0x27, 0x48, 0x5d, + 0x36, 0x8a, 0x61, 0x06, 0x12, 0x73, 0xdc, 0xaa, 0x49, 0xc4, 0x79, 0x82, 0xd4, 0x73, 0x82, 0xe3, + 0x56, 0x2d, 0x06, 0xbc, 0x0f, 0x6b, 0x1d, 0xfb, 0x98, 0x5a, 0x29, 0xc9, 0x0a, 0x41, 0x6a, 0xde, + 0x58, 0x95, 0x9b, 0xe3, 0xa0, 0x94, 0xa7, 0x40, 0x90, 0x7a, 0x5e, 0x82, 0x12, 0xa6, 0xf7, 0x00, + 0x5a, 0x8c, 0xf5, 0x25, 0x02, 0x08, 0x52, 0x57, 0x8c, 0x42, 0xb4, 0x93, 0x1a, 0x1b, 0x70, 0xdf, + 0x76, 0xbb, 0x12, 0x50, 0x14, 0xf1, 0x2f, 0xc6, 0x7b, 0xa9, 0xb1, 0xad, 0x01, 0xa7, 0x81, 0x44, + 0xbc, 0x47, 0x90, 0xba, 0x6a, 0x80, 0xd8, 0x1a, 0x73, 0x38, 0x35, 0x63, 0x8d, 0x20, 0x75, 0x2d, + 0x76, 0x38, 0xb1, 0xe2, 0x27, 0x00, 0xd4, 0x0d, 0x1d, 0x09, 0x58, 0x27, 0x48, 0x5d, 0xaf, 0xdd, + 0x98, 0x9b, 0xce, 0x83, 0xd0, 0xa1, 0xbe, 0xdd, 0x6e, 0xba, 0xa1, 0x63, 0x14, 0x22, 0xf9, 0x98, + 0xec, 0x43, 0x58, 0x0f, 0xc6, 0x1d, 0xdf, 0x20, 0x48, 0xdd, 0x30, 0xd6, 0x82, 0x31, 0xcf, 0x53, + 0x58, 0x1a, 0xc4, 0x12, 0x41, 0x6a, 0x29, 0x81, 0x65, 0xd2, 0x15, 0x64, 0xad, 0xbf, 0x40, 0x90, + 0x7a, 0xc1, 0x28, 0x06, 0x19, 0xeb, 0x25, 0x24, 0xe5, 0xc1, 0x04, 0xa9, 0x38, 0x86, 0x24, 0x2c, + 0x35, 0xb8, 0xe4, 0x53, 0x8f, 0x9a, 0x9c, 0x5a, 0x87, 0x63, 0x01, 0xdd, 0x24, 0x39, 0xb5, 0x60, + 0x6c, 0x26, 0x87, 0x4f, 0x32, 0x81, 0xbd, 0x0d, 0x45, 0xe6, 0xd2, 0x68, 0x0a, 0x45, 0x43, 0xa2, + 0x7c, 0x51, 0x34, 0xd4, 0x96, 0x16, 0x37, 0xb3, 0x96, 0x34, 0xb3, 0xd6, 0x8c, 0x4e, 0xef, 0x2f, + 0x19, 0x20, 0xc0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x0e, 0x75, + 0xe3, 0x9f, 0x37, 0x48, 0x9b, 0x39, 0xd1, 0xe2, 0x7a, 0xe5, 0x31, 0x6c, 0x9f, 0xd6, 0xdd, 0x51, + 0x59, 0x25, 0x4f, 0x81, 0x05, 0x3b, 0xa0, 0xf6, 0x73, 0xb8, 0xd6, 0x70, 0x19, 0xef, 0x51, 0x5f, + 0x32, 0x44, 0xc1, 0xc9, 0x24, 0xfe, 0x47, 0x63, 0x65, 0xb0, 0x68, 0x1a, 0x97, 0xf6, 0xfe, 0xac, + 0x9c, 0x34, 0x7e, 0xaf, 0x60, 0x0e, 0x9b, 0x0d, 0xb2, 0x67, 0xf3, 0xc8, 0xc1, 0x4c, 0x95, 0x3e, + 0x83, 0x8b, 0x5d, 0xe3, 0xd1, 0x9d, 0xdd, 0x7b, 0xb1, 0x35, 0xc4, 0xf3, 0xd9, 0xd7, 0xb4, 0xcd, + 0x17, 0xf5, 0xa2, 0x52, 0x72, 0x99, 0x4b, 0x7f, 0x2c, 0x33, 0x15, 0xa1, 0x6b, 0xb9, 0x9b, 0xda, + 0x47, 0x3b, 0x39, 0xa4, 0x2c, 0xd7, 0x4a, 0xa6, 0xe7, 0xf5, 0xed, 0xb6, 0x08, 0xa5, 0xfe, 0x75, + 0xc0, 0xdc, 0xda, 0x56, 0x76, 0xe7, 0x78, 0xb7, 0xc3, 0xd8, 0xae, 0x63, 0x3b, 0xb4, 0x3e, 0x85, + 0xac, 0xcf, 0x40, 0xfa, 0x9f, 0xc1, 0xe5, 0x07, 0xaf, 0xe3, 0x9f, 0x75, 0x61, 0x51, 0xd3, 0x9f, + 0x17, 0xd2, 0xf2, 0x6c, 0xe5, 0x45, 0xf4, 0x6e, 0xfd, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x34, 0xb2, + 0xff, 0x60, 0xfa, 0x13, 0x00, 0x00, } diff --git a/examples/examplepb/a_bit_of_everything.proto b/examples/examplepb/a_bit_of_everything.proto index 15d0cd9f6b0..8da0c2e8e3d 100644 --- a/examples/examplepb/a_bit_of_everything.proto +++ b/examples/examplepb/a_bit_of_everything.proto @@ -36,7 +36,7 @@ option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = { // Intentionaly complicated message type to cover much features of Protobuf. -// NEXT ID: 27 +// NEXT ID: 30 message ABitOfEverything { option (grpc.gateway.protoc_gen_swagger.options.openapiv2_schema) = { external_docs: { @@ -72,7 +72,7 @@ message ABitOfEverything { fixed32 fixed32_value = 9; bool bool_value = 10; string string_value = 11; - // TODO(yugui) add bytes_value + bytes bytes_value = 29; uint32 uint32_value = 13; NumericEnum enum_value = 14; sfixed32 sfixed32_value = 15; diff --git a/examples/examplepb/a_bit_of_everything.swagger.json b/examples/examplepb/a_bit_of_everything.swagger.json index 1840421f2c1..59fa4c77daa 100644 --- a/examples/examplepb/a_bit_of_everything.swagger.json +++ b/examples/examplepb/a_bit_of_everything.swagger.json @@ -185,9 +185,15 @@ "required": false, "type": "string" }, + { + "name": "bytes_value", + "in": "query", + "required": false, + "type": "string", + "format": "byte" + }, { "name": "uint32_value", - "description": "TODO(yugui) add bytes_value.", "in": "query", "required": false, "type": "integer", @@ -701,10 +707,13 @@ "string_value": { "type": "string" }, + "bytes_value": { + "type": "string", + "format": "byte" + }, "uint32_value": { "type": "integer", - "format": "int64", - "title": "TODO(yugui) add bytes_value" + "format": "int64" }, "enum_value": { "$ref": "#/definitions/examplepbNumericEnum" @@ -770,7 +779,7 @@ "title": "repeated enum value. it is comma-separated in query" } }, - "title": "Intentionaly complicated message type to cover much features of Protobuf.\nNEXT ID: 27", + "title": "Intentionaly complicated message type to cover much features of Protobuf.\nNEXT ID: 30", "externalDocs": { "description": "Find out more about ABitOfEverything", "url": "https://github.com/grpc-ecosystem/grpc-gateway" diff --git a/protoc-gen-grpc-gateway/descriptor/types.go b/protoc-gen-grpc-gateway/descriptor/types.go index c24bd61c890..88dff7bb902 100644 --- a/protoc-gen-grpc-gateway/descriptor/types.go +++ b/protoc-gen-grpc-gateway/descriptor/types.go @@ -295,8 +295,7 @@ var ( descriptor.FieldDescriptorProto_TYPE_STRING: "runtime.String", // FieldDescriptorProto_TYPE_GROUP // FieldDescriptorProto_TYPE_MESSAGE - // FieldDescriptorProto_TYPE_BYTES - // TODO(yugui) Handle bytes + descriptor.FieldDescriptorProto_TYPE_BYTES: "runtime.Bytes", descriptor.FieldDescriptorProto_TYPE_UINT32: "runtime.Uint32", // FieldDescriptorProto_TYPE_ENUM // TODO(yugui) Handle Enum diff --git a/runtime/convert.go b/runtime/convert.go index f8931864100..afbcbd4fa10 100644 --- a/runtime/convert.go +++ b/runtime/convert.go @@ -1,6 +1,7 @@ package runtime import ( + "encoding/base64" "strconv" "github.com/golang/protobuf/jsonpb" @@ -61,6 +62,16 @@ func Uint32(val string) (uint32, error) { return uint32(i), nil } +// Bytes converts the given string representation of a byte sequence into a slice of bytes +// A bytes sequence is encoded in URL-safe base64 without padding +func Bytes(val string) ([]byte, error) { + b, err := base64.RawURLEncoding.DecodeString(val) + if err != nil { + return nil, err + } + return b, nil +} + // Timestamp converts the given RFC3339 formatted string into a timestamp.Timestamp. func Timestamp(val string) (*timestamp.Timestamp, error) { var r *timestamp.Timestamp diff --git a/runtime/query.go b/runtime/query.go index c00e0b914e2..d9f3b2583c7 100644 --- a/runtime/query.go +++ b/runtime/query.go @@ -1,6 +1,7 @@ package runtime import ( + "encoding/base64" "fmt" "net/url" "reflect" @@ -64,10 +65,14 @@ func populateFieldValueFromPath(msg proto.Message, fieldPath []string, values [] } m = f case reflect.Slice: - // TODO(yugui) Support []byte if !isLast { return fmt.Errorf("unexpected repeated field in %s", strings.Join(fieldPath, ".")) } + // Handle []byte + if f.Type().Elem().Kind() == reflect.Uint8 { + m = f + break + } return populateRepeatedField(f, values, props) case reflect.Ptr: if f.IsNil() { @@ -203,6 +208,13 @@ func populateField(f reflect.Value, value string, props *proto.Properties) error case "StringValue": f.Field(0).SetString(value) return nil + case "BytesValue": + bytesVal, err := base64.RawURLEncoding.DecodeString(value) + if err != nil { + return fmt.Errorf("bad BytesValue: %s", value) + } + f.Field(0).SetBytes(bytesVal) + return nil } } @@ -274,6 +286,6 @@ var ( reflect.Int32: reflect.ValueOf(Int32), reflect.Uint64: reflect.ValueOf(Uint64), reflect.Uint32: reflect.ValueOf(Uint32), - // TODO(yugui) Support []byte + reflect.Slice: reflect.ValueOf(Bytes), } ) diff --git a/runtime/query_test.go b/runtime/query_test.go index 95a72a4af1c..d5b4c758469 100644 --- a/runtime/query_test.go +++ b/runtime/query_test.go @@ -41,6 +41,7 @@ func TestPopulateParameters(t *testing.T) { "uint32_value": {"4"}, "bool_value": {"true"}, "string_value": {"str"}, + "bytes_value": {"Ynl0ZXM"}, "repeated_value": {"a", "b", "c"}, "enum_value": {"1"}, "repeated_enum": {"1", "2", "0"}, @@ -53,6 +54,7 @@ func TestPopulateParameters(t *testing.T) { "wrapper_u_int32_value": {"4"}, "wrapper_bool_value": {"true"}, "wrapper_string_value": {"str"}, + "wrapper_bytes_value": {"Ynl0ZXM"}, }, filter: utilities.NewDoubleArray(nil), want: &proto3Message{ @@ -64,6 +66,7 @@ func TestPopulateParameters(t *testing.T) { Uint32Value: 4, BoolValue: true, StringValue: "str", + BytesValue: []byte("bytes"), RepeatedValue: []string{"a", "b", "c"}, EnumValue: EnumValue_Y, RepeatedEnum: []EnumValue{EnumValue_Y, EnumValue_Z, EnumValue_X}, @@ -76,6 +79,7 @@ func TestPopulateParameters(t *testing.T) { WrapperUInt32Value: &wrappers.UInt32Value{4}, WrapperBoolValue: &wrappers.BoolValue{true}, WrapperStringValue: &wrappers.StringValue{"str"}, + WrapperBytesValue: &wrappers.BytesValue{[]byte("bytes")}, }, }, { @@ -88,6 +92,7 @@ func TestPopulateParameters(t *testing.T) { "uint32Value": {"4"}, "boolValue": {"true"}, "stringValue": {"str"}, + "bytesValue": {"Ynl0ZXM"}, "repeatedValue": {"a", "b", "c"}, "enumValue": {"1"}, "repeatedEnum": {"1", "2", "0"}, @@ -100,6 +105,7 @@ func TestPopulateParameters(t *testing.T) { "wrapperUInt32Value": {"4"}, "wrapperBoolValue": {"true"}, "wrapperStringValue": {"str"}, + "wrapperBytesValue": {"Ynl0ZXM"}, }, filter: utilities.NewDoubleArray(nil), want: &proto3Message{ @@ -111,6 +117,7 @@ func TestPopulateParameters(t *testing.T) { Uint32Value: 4, BoolValue: true, StringValue: "str", + BytesValue: []byte("bytes"), RepeatedValue: []string{"a", "b", "c"}, EnumValue: EnumValue_Y, RepeatedEnum: []EnumValue{EnumValue_Y, EnumValue_Z, EnumValue_X}, @@ -123,6 +130,7 @@ func TestPopulateParameters(t *testing.T) { WrapperUInt32Value: &wrappers.UInt32Value{4}, WrapperBoolValue: &wrappers.BoolValue{true}, WrapperStringValue: &wrappers.StringValue{"str"}, + WrapperBytesValue: &wrappers.BytesValue{[]byte("bytes")}, }, }, { @@ -471,6 +479,7 @@ type proto3Message struct { Uint32Value uint32 `protobuf:"varint,7,opt,name=uint32_value,json=uint32Value" json:"uint32_value,omitempty"` BoolValue bool `protobuf:"varint,8,opt,name=bool_value,json=boolValue" json:"bool_value,omitempty"` StringValue string `protobuf:"bytes,9,opt,name=string_value,json=stringValue" json:"string_value,omitempty"` + BytesValue []byte `protobuf:"bytes,25,opt,name=bytes_value,json=bytesValue" json:"bytes_value,omitempty"` RepeatedValue []string `protobuf:"bytes,10,rep,name=repeated_value,json=repeatedValue" json:"repeated_value,omitempty"` EnumValue EnumValue `protobuf:"varint,11,opt,name=enum_value,json=enumValue,enum=runtime_test_api.EnumValue" json:"enum_value,omitempty"` RepeatedEnum []EnumValue `protobuf:"varint,12,rep,packed,name=repeated_enum,json=repeatedEnum,enum=runtime_test_api.EnumValue" json:"repeated_enum,omitempty"` @@ -484,6 +493,7 @@ type proto3Message struct { WrapperUInt32Value *wrappers.UInt32Value `protobuf:"bytes,22,opt,name=wrapper_u_int32_value,json=wrapperUInt32Value" json:"wrapper_u_int32_value,omitempty"` WrapperBoolValue *wrappers.BoolValue `protobuf:"bytes,23,opt,name=wrapper_bool_value,json=wrapperBoolValue" json:"wrapper_bool_value,omitempty"` WrapperStringValue *wrappers.StringValue `protobuf:"bytes,24,opt,name=wrapper_string_value,json=wrapperStringValue" json:"wrapper_string_value,omitempty"` + WrapperBytesValue *wrappers.BytesValue `protobuf:"bytes,26,opt,name=wrapper_bytes_value,json=wrapperBytesValue" json:"wrapper_bytes_value,omitempty"` } func (m *proto3Message) Reset() { *m = proto3Message{} }