有没有一种方法可以使用原型文件中的注释来提供服务描述?

时间:2018-09-06 04:49:45

标签: protoc

`syntax =“ proto3”;

import "google/api/annotations.proto";

//SampleService
service SampleService1{
    // Comment 1
    rpc Method (Empty) returns (Empty){
        option (google.api.http) = {
            get : "/api/method1"
        };
    }
}

service SampleService2{
    // Comment 2
    rpc Method (Empty) returns (Empty){
        option (google.api.http) = {
            get : "/api/method2"
        };
    }
}

message Empty {}`

在原始文件中,我们使用上面显示的注释来提供消息方法的描述,但对于服务,这是行不通的

有没有一种方法可以通过注释来提供服务描述?

0 个答案:

没有答案