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-02-27 19:51:56 +03:00
|
|
|
import "api/annotations.proto";
|
2021-10-27 01:24:35 +03:00
|
|
|
import "openapiv3/annotations.proto";
|
2021-01-19 04:15:57 +03:00
|
|
|
|
|
|
|
service Github {
|
|
|
|
rpc LookupUser(LookupUserReq) returns (LookupUserRsp) {
|
2021-10-27 01:24:35 +03:00
|
|
|
option (micro.openapiv3.openapiv3_operation) = {
|
2021-01-19 04:15:57 +03:00
|
|
|
operation_id: "LookupUser";
|
|
|
|
responses: {
|
2021-10-27 01:24:35 +03:00
|
|
|
default: {
|
|
|
|
reference: {
|
|
|
|
_ref: ".github.Error";
|
2021-08-17 01:11:23 +03:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2021-01-19 04:15:57 +03:00
|
|
|
};
|
2021-02-27 19:51:56 +03:00
|
|
|
option (micro.api.http) = { get: "/users/{username}"; };
|
2021-01-19 04:15:57 +03:00
|
|
|
};
|
2021-03-30 18:34:04 +03:00
|
|
|
rpc LookupUserWithoutPath(LookupUserReq) returns (LookupUserRsp) {
|
2021-10-27 01:24:35 +03:00
|
|
|
option (micro.openapiv3.openapiv3_operation) = {
|
2021-03-30 18:34:04 +03:00
|
|
|
operation_id: "LookupUserWithoutPath";
|
|
|
|
responses: {
|
2021-10-27 01:24:35 +03:00
|
|
|
default: {
|
|
|
|
reference: {
|
|
|
|
_ref: ".github.Error";
|
2021-08-17 01:11:23 +03:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2021-03-30 18:34:04 +03:00
|
|
|
};
|
|
|
|
option (micro.api.http) = { get: "/{username}"; };
|
|
|
|
};
|
|
|
|
|
2021-01-19 04:15:57 +03:00
|
|
|
};
|
2021-03-09 14:25:27 +03:00
|
|
|
|
2021-01-19 04:15:57 +03:00
|
|
|
message LookupUserReq {
|
|
|
|
string username = 1;
|
|
|
|
};
|
2021-03-09 14:25:27 +03:00
|
|
|
|
2021-01-19 04:15:57 +03:00
|
|
|
message LookupUserRsp {
|
|
|
|
string name = 1;
|
|
|
|
};
|
2021-03-09 14:25:27 +03:00
|
|
|
|
2021-01-19 04:15:57 +03:00
|
|
|
message Error {
|
|
|
|
string message = 1;
|
2021-07-05 16:26:57 +03:00
|
|
|
string documentation_url = 2;
|
2021-01-19 04:15:57 +03:00
|
|
|
};
|
|
|
|
|