41 lines
916 B
Protocol Buffer
Raw Normal View History

syntax = "proto3";
package example;
option go_package = "github.com/unistack-org/protoc-gen-go-micro/v3/example;examplepb";
import "tag/tag.proto";
import "api/annotations.proto";
import "openapiv3/annotations.proto";
//import "google/protobuf/wrappers.proto";
import "graphql/graphql.proto";
service Example {
rpc Call(CallReq) returns (CallRsp) {
option (micro.graphql.rpc) = {type: QUERY};
option (micro.openapiv3.openapiv3_operation) = {
operation_id: "Call";
responses: {
default: {
reference: {_ref: ".example.Error"};
};
};
};
option (micro.api.http) = { post: "/v1/example/call/{name}"; body: "*"; };
option (micro.api.micro_method) = { timeout: "5s"; };
};
};
message CallReq {
string name = 1 [(micro.graphql.field) = {required: true}];
string req = 2;
};
message CallRsp {
string rsp = 2;
};
message Error {
string msg = 1;
};