Closed aadedamola closed 2 years ago
Do you have a simple proto file as an example?
Thanks @bullgare. Here is a sample proto.
package example;
option go_package = "./pkg/example;exampleservice";
import "google/api/annotations.proto";
import "google/protobuf/timestamp.proto";
import "protoc-gen-swagger/options/annotations.proto";
service ExampleService {
// Add two nullables
rpc Add(Request) returns (Response) {
option (google.api.http) = {
post: "/api/v1/add"
body: "*"
};
}
}
message Request {
optional int64 value1 = 1;
optional int64 value2 = 2;
}
message Response {
int64 sum = 1;
}
Thanks a lot! Published with v3.1.0
Anytime I use this plugin to generate code from a proto file, I get this error message:
example.proto is a proto3 file that contains optional fields, but code generator protoc-gen-goclay hasn't been updated to support optional fields in proto3. Please ask the owner of this code generator to support proto3 optional.--goclay_out:
Since this update supports optionals by default, we should support optionals during code generation?