Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for proto3 #8

Open
sxwebdev opened this issue Aug 31, 2022 · 0 comments
Open

support for proto3 #8

sxwebdev opened this issue Aug 31, 2022 · 0 comments

Comments

@sxwebdev
Copy link

sxwebdev commented Aug 31, 2022

I try to run a command and I get the following error

protoc \
        --go_out=:pb \
        --go-grpc_out=:pb \
        --struct-transformer_out=package=transform,debug=false,goimports=true,paths=import:. \
        ./proto/user.proto
proto/user.proto: is a proto3 file that contains optional fields, but code generator protoc-gen-struct-transformer hasn't been updated to support optional fields in proto3. Please ask the owner of this code generator to support proto3 optional.--struct-transformer_out: 
make: *** [genproto] Error 1

proto file

syntax = "proto3";
package user;

import "proto/options/annotations.proto";

option go_package = ".;pb";

option (transformer.go_repo_package) = "store";
option (transformer.go_protobuf_package) = "pb";
option (transformer.go_models_file_path) = "./internal/store/models.go";

message User {
  option (transformer.go_struct) = "User";
  string id = 1;
  string first_name = 2;
  string last_name = 3;
  optional string patronymic = 4;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant