diff --git a/api/helloworld/v1/error_reason.pb.go b/api/helloworld/v1/error_reason.pb.go index 132abaa5138d93304890bec95d511e66184e62d9..d8338df99653bf4befd27570a72168cd4b13fde7 100644 --- a/api/helloworld/v1/error_reason.pb.go +++ b/api/helloworld/v1/error_reason.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 -// protoc v3.19.3 +// protoc-gen-go v1.28.0 +// protoc v3.20.1 // source: helloworld/v1/error_reason.proto package v1 @@ -75,14 +75,8 @@ var file_helloworld_v1_error_reason_proto_rawDesc = []byte{ 0x31, 0x2a, 0x39, 0x0a, 0x0b, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x12, 0x47, 0x45, 0x45, 0x54, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x55, 0x53, 0x45, 0x52, - 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x01, 0x42, 0x5c, 0x0a, 0x0d, - 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x50, 0x01, 0x5a, - 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2d, 0x6b, - 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2f, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2d, 0x6c, 0x61, 0x79, - 0x6f, 0x75, 0x74, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, - 0x6c, 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x31, 0xa2, 0x02, 0x0f, 0x41, 0x50, 0x49, 0x48, 0x65, - 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x01, 0x42, 0x07, 0x5a, 0x05, + 0x2e, 0x2f, 0x3b, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/helloworld/v1/error_reason.proto b/api/helloworld/v1/error_reason.proto index 0149889ee67d8174fb9e458638443c54f7a1b86e..508e2283f4044212c68d83e1dc6611ed25d6fa37 100644 --- a/api/helloworld/v1/error_reason.proto +++ b/api/helloworld/v1/error_reason.proto @@ -2,10 +2,7 @@ syntax = "proto3"; package helloworld.v1; -option go_package = "github.com/go-kratos/kratos-layout/api/helloworld/v1;v1"; -option java_multiple_files = true; -option java_package = "helloworld.v1"; -option objc_class_prefix = "APIHelloworldV1"; +option go_package = "./;v1"; enum ErrorReason { GEETER_UNSPECIFIED = 0; diff --git a/api/helloworld/v1/greeter.pb.go b/api/helloworld/v1/greeter.pb.go index f95e53ceae868350bd442d91a607c32c00ae0d88..7f016be6ff14e9125617d716e3d990f39c25df4e 100644 --- a/api/helloworld/v1/greeter.pb.go +++ b/api/helloworld/v1/greeter.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 -// protoc v3.19.3 +// protoc-gen-go v1.28.0 +// protoc v3.20.1 // source: helloworld/v1/greeter.proto package v1 @@ -136,14 +136,8 @@ var file_helloworld_v1_greeter_proto_rawDesc = []byte{ 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, - 0x7d, 0x42, 0x6c, 0x0a, 0x1c, 0x64, 0x65, 0x76, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x2e, 0x76, - 0x31, 0x42, 0x11, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x56, 0x31, 0x50, 0x01, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2d, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2f, 0x6b, 0x72, 0x61, - 0x74, 0x6f, 0x73, 0x2d, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x68, - 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x7d, 0x42, 0x07, 0x5a, 0x05, 0x2e, 0x2f, 0x3b, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/api/helloworld/v1/greeter.proto b/api/helloworld/v1/greeter.proto index 5e1334b6781173c9d565a51413edffab4a361ce6..e3694c1c33a64225df86b2d142ac3895936f1613 100644 --- a/api/helloworld/v1/greeter.proto +++ b/api/helloworld/v1/greeter.proto @@ -4,10 +4,7 @@ package helloworld.v1; import "google/api/annotations.proto"; -option go_package = "github.com/go-kratos/kratos-layout/api/helloworld/v1;v1"; -option java_multiple_files = true; -option java_package = "dev.kratos.api.helloworld.v1"; -option java_outer_classname = "HelloworldProtoV1"; +option go_package = "./;v1"; // The greeting service definition. service Greeter { diff --git a/api/helloworld/v1/greeter_grpc.pb.go b/api/helloworld/v1/greeter_grpc.pb.go index 99a9bda0deb103c6c81a8f165ac4698276a21e72..5f2351003c5ca12adfcc65b230977dc202e70f88 100644 --- a/api/helloworld/v1/greeter_grpc.pb.go +++ b/api/helloworld/v1/greeter_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.2.0 -// - protoc v3.19.3 +// - protoc v3.20.1 // source: helloworld/v1/greeter.proto package v1 diff --git a/api/helloworld/v1/greeter_http.pb.go b/api/helloworld/v1/greeter_http.pb.go index be38a7ec64a6e8aa71e8160018643b30a5dbb265..069b4de5bcf831c276d5a5f6b12b0cd0005f8799 100644 --- a/api/helloworld/v1/greeter_http.pb.go +++ b/api/helloworld/v1/greeter_http.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-http. DO NOT EDIT. // versions: -// protoc-gen-go-http v2.1.3 +// protoc-gen-go-http v2.3.1 package v1 @@ -17,6 +17,8 @@ var _ = binding.EncodeURL const _ = http.SupportPackageIsVersion1 +const OperationGreeterSayHello = "/helloworld.v1.Greeter/SayHello" + type GreeterHTTPServer interface { SayHello(context.Context, *HelloRequest) (*HelloReply, error) } @@ -35,7 +37,7 @@ func _Greeter_SayHello0_HTTP_Handler(srv GreeterHTTPServer) func(ctx http.Contex if err := ctx.BindVars(&in); err != nil { return err } - http.SetOperation(ctx, "/helloworld.v1.Greeter/SayHello") + http.SetOperation(ctx, OperationGreeterSayHello) h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { return srv.SayHello(ctx, req.(*HelloRequest)) }) @@ -64,7 +66,7 @@ func (c *GreeterHTTPClientImpl) SayHello(ctx context.Context, in *HelloRequest, var out HelloReply pattern := "/helloworld/{name}" path := binding.EncodeURL(pattern, in, true) - opts = append(opts, http.Operation("/helloworld.v1.Greeter/SayHello")) + opts = append(opts, http.Operation(OperationGreeterSayHello)) opts = append(opts, http.PathTemplate(pattern)) err := c.cc.Invoke(ctx, "GET", path, nil, &out, opts...) if err != nil { diff --git a/openapi.yaml b/openapi.yaml index 68670575160047700c3225ea94aac6d0a8e78dba..f090b4770530b499993df2dff0b0ea61f5ffd379 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -11,7 +11,6 @@ paths: get: tags: - Greeter - - subgroup description: Sends a greeting operationId: Greeter_SayHello parameters: