Код: Выделить всё
syntax = "proto3";
package test;
import "google/api/annotations.proto";
service Test {
rpc TestCall (Request) returns (Response) {
option (google.api.http) = {
post: "/test.Test/TestCall/{query}"
body: "*"
};
}
}
message Request {
string query = 1;
string language = 2;
}
message Response {
float temperature = 2;
int32 pressure = 3;
string description = 4;
}
р>
Код: Выделить всё
const google::protobuf::FileDescriptor* file;
const google::protobuf::MethodDescriptor* descriptor = file->service(0)->method(0);
auto ext = descriptor->options().GetExtension(...);
Итак, как мне получить значения параметров из кода генератора ?
Спасибо!
Подробнее здесь: https://stackoverflow.com/questions/786 ... -generator