micro-examples/http/proto/example.proto
Vasiliy Tolstov 5608190dbf initial import
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2022-11-28 12:39:25 +03:00

38 lines
745 B
Protocol Buffer

syntax = "proto3";
package example;
option go_package = "go.unistack.org/micro-examples/http/proto;pb";
import "tag/tag.proto";
import "api/annotations.proto";
import "openapiv3/annotations.proto";
import "google/protobuf/wrappers.proto";
service ExampleService {
rpc Hello(HelloReq) returns (HelloRsp) {
option (micro.openapiv3.openapiv3_operation) = {
operation_id: "Hello";
responses: {
default: {
reference: {
_ref: ".example.Error";
};
};
};
};
option (micro.api.http) = { post: "/v1/example/hello"; body: "*"; };
option (micro.api.micro_method) = { timeout: "5s"; };
};
};
message HelloReq {
};
message HelloRsp {
};
message Error {
string msg = 1;
};