2021-01-19 04:15:57 +03:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package github;
|
|
|
|
option go_package = "github.com//unistack-org/micro-tests/client/http/proto;pb";
|
2021-01-19 12:50:35 +03:00
|
|
|
|
2021-01-19 04:15:57 +03:00
|
|
|
import "google/api/annotations.proto";
|
|
|
|
import "protoc-gen-openapiv2/options/annotations.proto";
|
|
|
|
|
|
|
|
service Github {
|
|
|
|
rpc LookupUser(LookupUserReq) returns (LookupUserRsp) {
|
|
|
|
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
|
|
|
operation_id: "LookupUser";
|
|
|
|
responses: {
|
|
|
|
key: "default";
|
|
|
|
value: {
|
|
|
|
description: "Error response";
|
2021-01-19 12:50:35 +03:00
|
|
|
schema: { json_schema: { ref: ".github.Error"; } }
|
2021-01-19 04:15:57 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
2021-01-19 12:50:35 +03:00
|
|
|
option (google.api.http) = { get: "/users/{username}"; };
|
2021-01-19 04:15:57 +03:00
|
|
|
};
|
|
|
|
};
|
|
|
|
message LookupUserReq {
|
|
|
|
string username = 1;
|
|
|
|
};
|
|
|
|
message LookupUserRsp {
|
|
|
|
string name = 1;
|
|
|
|
};
|
|
|
|
message Error {
|
|
|
|
string message = 1;
|
|
|
|
};
|
|
|
|
|