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 d66b34f54b2..a9cf948d7ae 100644 --- a/examples/clients/abe/a_bit_of_everything_service_api.go +++ b/examples/clients/abe/a_bit_of_everything_service_api.go @@ -501,6 +501,70 @@ func (a ABitOfEverythingServiceApi) Echo3(value string) (*SubStringMessage, *API return successPayload, localVarAPIResponse, err } +/** + * + * + * @param id + * @param body + * @return *ProtobufEmpty + */ +func (a ABitOfEverythingServiceApi) GetMessageWithBody(id string, body ExamplepbBody) (*ProtobufEmpty, *APIResponse, error) { + + var localVarHttpMethod = strings.ToUpper("Post") + // create path and map variables + localVarPath := a.Configuration.BasePath + "/v2/example/withbody/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", fmt.Sprintf("%v", id), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := make(map[string]string) + var localVarPostBody interface{} + var localVarFileName string + var localVarFileBytes []byte + // add default headers if any + for key := range a.Configuration.DefaultHeader { + localVarHeaderParams[key] = a.Configuration.DefaultHeader[key] + } + + // to determine the Content-Type header + localVarHttpContentTypes := []string{ "application/json", "application/x-foo-mime", } + + // set Content-Type header + localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + // to determine the Accept header + localVarHttpHeaderAccepts := []string{ + "application/json", + "application/x-foo-mime", + } + + // set Accept header + localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &body + var successPayload = new(ProtobufEmpty) + localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + + var localVarURL, _ = url.Parse(localVarPath) + localVarURL.RawQuery = localVarQueryParams.Encode() + var localVarAPIResponse = &APIResponse{Operation: "GetMessageWithBody", Method: localVarHttpMethod, RequestURL: localVarURL.String()} + if localVarHttpResponse != nil { + localVarAPIResponse.Response = localVarHttpResponse.RawResponse + localVarAPIResponse.Payload = localVarHttpResponse.Body() + } + + if err != nil { + return successPayload, localVarAPIResponse, err + } + err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload) + return successPayload, localVarAPIResponse, err +} + /** * * diff --git a/examples/clients/abe/api_client.go b/examples/clients/abe/api_client.go index bf3e21a9fb1..fa9083f4804 100644 --- a/examples/clients/abe/api_client.go +++ b/examples/clients/abe/api_client.go @@ -18,7 +18,7 @@ import ( "strings" "net/url" "io/ioutil" - "github.com/go-resty/resty" + "gopkg.in/go-resty/resty.v0" ) type APIClient struct { diff --git a/examples/clients/abe/examplepb_body.go b/examples/clients/abe/examplepb_body.go new file mode 100644 index 00000000000..13f4c2dc1e1 --- /dev/null +++ b/examples/clients/abe/examplepb_body.go @@ -0,0 +1,16 @@ +/* + * A Bit of Everything + * + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.0 + * Contact: none@example.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +package abe + +type ExamplepbBody struct { + + Name string `json:"name,omitempty"` +} diff --git a/examples/clients/echo/api_client.go b/examples/clients/echo/api_client.go index 7a517148026..46d8271aa87 100644 --- a/examples/clients/echo/api_client.go +++ b/examples/clients/echo/api_client.go @@ -18,7 +18,7 @@ import ( "strings" "net/url" "io/ioutil" - "github.com/go-resty/resty" + "gopkg.in/go-resty/resty.v0" ) type APIClient struct { diff --git a/examples/examplepb/a_bit_of_everything.pb.go b/examples/examplepb/a_bit_of_everything.pb.go index 2727fba7b07..7ac85fc900d 100644 --- a/examples/examplepb/a_bit_of_everything.pb.go +++ b/examples/examplepb/a_bit_of_everything.pb.go @@ -429,9 +429,51 @@ func (m *ABitOfEverything_Nested) GetOk() ABitOfEverything_Nested_DeepEnum { return ABitOfEverything_Nested_FALSE } +type Body struct { + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` +} + +func (m *Body) Reset() { *m = Body{} } +func (m *Body) String() string { return proto.CompactTextString(m) } +func (*Body) ProtoMessage() {} +func (*Body) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{1} } + +func (m *Body) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +type MessageWithBody struct { + Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` + Data *Body `protobuf:"bytes,2,opt,name=data" json:"data,omitempty"` +} + +func (m *MessageWithBody) Reset() { *m = MessageWithBody{} } +func (m *MessageWithBody) String() string { return proto.CompactTextString(m) } +func (*MessageWithBody) ProtoMessage() {} +func (*MessageWithBody) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{2} } + +func (m *MessageWithBody) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *MessageWithBody) GetData() *Body { + if m != nil { + return m.Data + } + return nil +} + func init() { proto.RegisterType((*ABitOfEverything)(nil), "grpc.gateway.examples.examplepb.ABitOfEverything") proto.RegisterType((*ABitOfEverything_Nested)(nil), "grpc.gateway.examples.examplepb.ABitOfEverything.Nested") + proto.RegisterType((*Body)(nil), "grpc.gateway.examples.examplepb.Body") + proto.RegisterType((*MessageWithBody)(nil), "grpc.gateway.examples.examplepb.MessageWithBody") proto.RegisterEnum("grpc.gateway.examples.examplepb.NumericEnum", NumericEnum_name, NumericEnum_value) proto.RegisterEnum("grpc.gateway.examples.examplepb.ABitOfEverything_Nested_DeepEnum", ABitOfEverything_Nested_DeepEnum_name, ABitOfEverything_Nested_DeepEnum_value) } @@ -464,6 +506,7 @@ type ABitOfEverythingServiceClient interface { DeepPathEcho(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*ABitOfEverything, error) NoBindings(ctx context.Context, in *google_protobuf2.Duration, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) Timeout(ctx context.Context, in *google_protobuf1.Empty, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) + GetMessageWithBody(ctx context.Context, in *MessageWithBody, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) } type aBitOfEverythingServiceClient struct { @@ -564,6 +607,15 @@ func (c *aBitOfEverythingServiceClient) Timeout(ctx context.Context, in *google_ return out, nil } +func (c *aBitOfEverythingServiceClient) GetMessageWithBody(ctx context.Context, in *MessageWithBody, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) { + out := new(google_protobuf1.Empty) + err := grpc.Invoke(ctx, "/grpc.gateway.examples.examplepb.ABitOfEverythingService/GetMessageWithBody", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // Server API for ABitOfEverythingService service type ABitOfEverythingServiceServer interface { @@ -584,6 +636,7 @@ type ABitOfEverythingServiceServer interface { DeepPathEcho(context.Context, *ABitOfEverything) (*ABitOfEverything, error) NoBindings(context.Context, *google_protobuf2.Duration) (*google_protobuf1.Empty, error) Timeout(context.Context, *google_protobuf1.Empty) (*google_protobuf1.Empty, error) + GetMessageWithBody(context.Context, *MessageWithBody) (*google_protobuf1.Empty, error) } func RegisterABitOfEverythingServiceServer(s *grpc.Server, srv ABitOfEverythingServiceServer) { @@ -770,6 +823,24 @@ func _ABitOfEverythingService_Timeout_Handler(srv interface{}, ctx context.Conte return interceptor(ctx, in, info, handler) } +func _ABitOfEverythingService_GetMessageWithBody_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MessageWithBody) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ABitOfEverythingServiceServer).GetMessageWithBody(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.gateway.examples.examplepb.ABitOfEverythingService/GetMessageWithBody", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ABitOfEverythingServiceServer).GetMessageWithBody(ctx, req.(*MessageWithBody)) + } + return interceptor(ctx, in, info, handler) +} + var _ABitOfEverythingService_serviceDesc = grpc.ServiceDesc{ ServiceName: "grpc.gateway.examples.examplepb.ABitOfEverythingService", HandlerType: (*ABitOfEverythingServiceServer)(nil), @@ -814,6 +885,10 @@ var _ABitOfEverythingService_serviceDesc = grpc.ServiceDesc{ MethodName: "Timeout", Handler: _ABitOfEverythingService_Timeout_Handler, }, + { + MethodName: "GetMessageWithBody", + Handler: _ABitOfEverythingService_GetMessageWithBody_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "examples/examplepb/a_bit_of_everything.proto", @@ -886,105 +961,110 @@ var _AnotherServiceWithNoBindings_serviceDesc = grpc.ServiceDesc{ func init() { proto.RegisterFile("examples/examplepb/a_bit_of_everything.proto", fileDescriptor1) } var fileDescriptor1 = []byte{ - // 1590 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0xcf, 0x6f, 0x1b, 0xc5, - 0x17, 0xcf, 0xd8, 0x89, 0x13, 0x8f, 0xf3, 0xc3, 0x99, 0xb4, 0xa9, 0xeb, 0xe6, 0xfb, 0xcd, 0xd4, - 0x2d, 0x68, 0x15, 0xe2, 0x5d, 0xe2, 0x56, 0xa8, 0xb5, 0x04, 0xc5, 0x49, 0xdc, 0x1f, 0xa2, 0x4d, - 0xdb, 0xed, 0x0f, 0xaa, 0xd0, 0x12, 0xad, 0xed, 0xb1, 0xbd, 0x8d, 0x77, 0x67, 0xd9, 0x9d, 0x4d, - 0x63, 0x19, 0x73, 0xe0, 0x80, 0xd4, 0x6b, 0xb8, 0x21, 0xd1, 0x0b, 0x12, 0x02, 0x09, 0x8e, 0x9c, - 0x38, 0x70, 0xe7, 0xca, 0x5f, 0x80, 0xc4, 0x1f, 0x82, 0x76, 0x66, 0x77, 0xb3, 0xb6, 0x63, 0xa5, - 0x4e, 0x51, 0x4f, 0xde, 0x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9, 0x98, 0x84, 0xc9, 0xfd, 0x4c, - 0xf2, 0x16, 0xb7, 0x57, 0xa7, 0x05, 0x9d, 0x18, 0x21, 0x04, 0xc7, 0x5d, 0x57, 0xaf, 0x65, 0x00, - 0x06, 0x52, 0x52, 0xe5, 0xdf, 0xe8, 0x1e, 0x4c, 0xf8, 0x5a, 0x31, 0x1c, 0x7f, 0x23, 0x2d, 0x9f, - 0x07, 0x2d, 0xc3, 0x54, 0xbd, 0x45, 0x35, 0xb6, 0xb3, 0xa7, 0xb5, 0x5c, 0x92, 0x89, 0x63, 0x20, - 0xc5, 0x54, 0xc8, 0xa7, 0x1e, 0x7b, 0x33, 0xe8, 0x3c, 0x9c, 0xae, 0x51, 0xb7, 0xd2, 0x22, 0x3e, - 0x62, 0x1c, 0x03, 0x09, 0xa8, 0x29, 0x31, 0x27, 0x20, 0xcb, 0x30, 0xa5, 0x9b, 0xec, 0x83, 0xcb, - 0x3e, 0x62, 0x02, 0x03, 0x29, 0xae, 0x42, 0x3e, 0x15, 0x72, 0xb8, 0x51, 0x44, 0x02, 0x03, 0x69, - 0x5c, 0x4d, 0xb9, 0x11, 0x88, 0xe0, 0xb8, 0x54, 0xf0, 0x11, 0x93, 0x18, 0x48, 0x13, 0x9c, 0xe3, - 0x52, 0x41, 0x00, 0x2e, 0xc0, 0x99, 0xba, 0xbe, 0x4f, 0x6a, 0x21, 0xc9, 0x14, 0x06, 0x52, 0x42, - 0x9d, 0xf6, 0x27, 0x7b, 0x41, 0x21, 0x4f, 0x12, 0x03, 0x69, 0xd2, 0x07, 0x05, 0x4c, 0xff, 0x83, - 0xb0, 0x42, 0x69, 0xcb, 0x47, 0x40, 0x0c, 0xa4, 0x29, 0x35, 0xe9, 0xcd, 0x84, 0xce, 0x3a, 0xcc, - 0xd6, 0xcd, 0x86, 0x0f, 0x48, 0xf1, 0xfc, 0xa7, 0xc4, 0x5c, 0x4f, 0x3c, 0xa1, 0xca, 0x0c, 0x06, - 0xd2, 0x8c, 0x88, 0x27, 0x10, 0xf9, 0x04, 0x42, 0x62, 0xba, 0x86, 0x0f, 0x98, 0xc5, 0x40, 0x9a, - 0x2d, 0xac, 0x1e, 0xbb, 0x5b, 0x5b, 0xae, 0x41, 0x6c, 0xbd, 0x5a, 0x36, 0x5d, 0x43, 0x4d, 0x7a, - 0xf6, 0x82, 0xec, 0x1d, 0x38, 0xeb, 0xf4, 0xc6, 0x35, 0x87, 0x81, 0x34, 0xa7, 0xce, 0x38, 0x3d, - 0x81, 0x85, 0xb0, 0x30, 0x47, 0x69, 0x0c, 0xa4, 0x74, 0x00, 0x8b, 0xec, 0x86, 0x13, 0xf5, 0x7e, - 0x1e, 0x03, 0x69, 0x5e, 0x4d, 0x39, 0x11, 0xef, 0x7d, 0x48, 0xc8, 0x83, 0x30, 0x90, 0x90, 0x80, - 0x04, 0x2c, 0x05, 0x78, 0xda, 0x26, 0x16, 0xd1, 0x18, 0xa9, 0xed, 0xf4, 0xe4, 0x6b, 0x01, 0xc7, - 0xa5, 0xa4, 0xba, 0x10, 0x2c, 0x3e, 0x88, 0xe4, 0xed, 0x2a, 0x4c, 0x51, 0x93, 0x78, 0x4d, 0xc6, - 0xeb, 0x01, 0x99, 0x53, 0xbc, 0x5e, 0x16, 0x65, 0x51, 0xab, 0x72, 0x50, 0xab, 0x72, 0xd9, 0x5b, - 0xbd, 0x39, 0xa6, 0x42, 0x0e, 0xe6, 0x23, 0x74, 0x01, 0x4e, 0x0b, 0x53, 0xa1, 0x95, 0x39, 0xed, - 0xed, 0xca, 0xcd, 0x31, 0x55, 0x10, 0x0a, 0x11, 0xf4, 0x14, 0x26, 0x0d, 0xcd, 0xf2, 0xfd, 0x58, - 0xe4, 0x15, 0x72, 0x6d, 0xf4, 0x0a, 0xb9, 0xa3, 0x59, 0xdc, 0xdd, 0xb2, 0xc9, 0xec, 0xb6, 0x3a, - 0x65, 0xf8, 0x43, 0xb4, 0x0f, 0x17, 0x0c, 0xcd, 0xb2, 0xfa, 0xe3, 0x3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0xee, 0x1c, 0xe6, 0x3f, 0x1a, 0xc2, 0xa8, 0xae, 0x6f, - 0x27, 0xc3, 0xd2, 0xa9, 0x24, 0x78, 0xf6, 0x2e, 0xfd, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x88, 0x7d, - 0xbe, 0x6f, 0xd5, 0x12, 0x00, 0x00, + // 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, 0xe1, 0x87, 0x29, + 0xc9, 0x82, 0x22, 0x67, 0x91, 0x93, 0x39, 0x33, 0xef, 0xfb, 0x3c, 0xef, 0xf7, 0x8c, 0x05, 0x77, + 0xe8, 0x89, 0x6e, 0x39, 0x7d, 0xea, 0xa9, 0xd1, 0x87, 0xd3, 0x52, 0xf5, 0x83, 0x96, 0xc9, 0x0f, + 0x58, 0xe7, 0x80, 0x1e, 0x51, 0x77, 0xc0, 0x7b, 0xa6, 0xdd, 0x55, 0x1c, 0x97, 0x71, 0x86, 0xb7, + 0xba, 0xae, 0xd3, 0x56, 0xba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f7, 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, 0x24, 0x2c, 0xab, + 0x04, 0xc9, 0xab, 0xa1, 0x3f, 0x31, 0xc9, 0x4f, 0x01, 0xa8, 0xed, 0x5b, 0x91, 0xc0, 0x1a, 0x41, + 0xf2, 0x5a, 0xed, 0xce, 0xdc, 0x6c, 0xed, 0xf9, 0x16, 0x75, 0xcd, 0x76, 0xd3, 0xf6, 0x2d, 0x2d, + 0x1f, 0xe8, 0x87, 0x60, 0x1f, 0xc0, 0x9a, 0x37, 0xee, 0xd7, 0x3a, 0x41, 0xf2, 0xba, 0xb6, 0xea, + 0x8d, 0x39, 0x96, 0x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xd6, 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, } diff --git a/examples/examplepb/a_bit_of_everything.pb.gw.go b/examples/examplepb/a_bit_of_everything.pb.gw.go index 25885abd8ef..f1c3ceee88f 100644 --- a/examples/examplepb/a_bit_of_everything.pb.gw.go +++ b/examples/examplepb/a_bit_of_everything.pb.gw.go @@ -450,6 +450,37 @@ func request_ABitOfEverythingService_Timeout_0(ctx context.Context, marshaler ru } +func request_ABitOfEverythingService_GetMessageWithBody_0(ctx context.Context, marshaler runtime.Marshaler, client ABitOfEverythingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MessageWithBody + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Data); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.GetMessageWithBody(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + // RegisterABitOfEverythingServiceHandlerFromEndpoint is same as RegisterABitOfEverythingServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterABitOfEverythingServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { @@ -807,6 +838,35 @@ func RegisterABitOfEverythingServiceHandlerClient(ctx context.Context, mux *runt }) + mux.Handle("POST", pattern_ABitOfEverythingService_GetMessageWithBody_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ABitOfEverythingService_GetMessageWithBody_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ABitOfEverythingService_GetMessageWithBody_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -832,6 +892,8 @@ var ( pattern_ABitOfEverythingService_DeepPathEcho_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "example", "a_bit_of_everything", "single_nested.name"}, "")) pattern_ABitOfEverythingService_Timeout_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v2", "example", "timeout"}, "")) + + pattern_ABitOfEverythingService_GetMessageWithBody_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v2", "example", "withbody", "id"}, "")) ) var ( @@ -856,4 +918,6 @@ var ( forward_ABitOfEverythingService_DeepPathEcho_0 = runtime.ForwardResponseMessage forward_ABitOfEverythingService_Timeout_0 = runtime.ForwardResponseMessage + + forward_ABitOfEverythingService_GetMessageWithBody_0 = runtime.ForwardResponseMessage ) diff --git a/examples/examplepb/a_bit_of_everything.proto b/examples/examplepb/a_bit_of_everything.proto index 6250bdd4381..15d0cd9f6b0 100644 --- a/examples/examplepb/a_bit_of_everything.proto +++ b/examples/examplepb/a_bit_of_everything.proto @@ -97,6 +97,16 @@ message ABitOfEverything { repeated NumericEnum repeated_enum_value = 28; } +message Body { + string name = 1; +} + +message MessageWithBody { + string id = 1; + Body data = 2; +} + + // NumericEnum is one or zero. enum NumericEnum { // ZERO means 0 @@ -194,6 +204,12 @@ service ABitOfEverythingService { get: "/v2/example/timeout", }; } + rpc GetMessageWithBody(MessageWithBody) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v2/example/withbody/{id}", + body: "data" + }; + } } service AnotherServiceWithNoBindings { diff --git a/examples/examplepb/a_bit_of_everything.swagger.json b/examples/examplepb/a_bit_of_everything.swagger.json index c42cd34ed13..4efff4bebb6 100644 --- a/examples/examplepb/a_bit_of_everything.swagger.json +++ b/examples/examplepb/a_bit_of_everything.swagger.json @@ -590,6 +590,38 @@ "ABitOfEverythingService" ] } + }, + "/v2/example/withbody/{id}": { + "post": { + "operationId": "GetMessageWithBody", + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/protobufEmpty" + } + } + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/examplepbBody" + } + } + ], + "tags": [ + "ABitOfEverythingService" + ] + } } }, "definitions": { diff --git a/examples/examplepb/echo_service.pb.go b/examples/examplepb/echo_service.pb.go index f4b5f3b5caa..0cca760395b 100644 --- a/examples/examplepb/echo_service.pb.go +++ b/examples/examplepb/echo_service.pb.go @@ -18,6 +18,8 @@ It is generated from these files: It has these top-level messages: SimpleMessage ABitOfEverything + Body + MessageWithBody EmptyProto NonEmptyProto UnaryProto