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

Permit optional fields in proto3 #18

Open
DazWilkin opened this issue Dec 5, 2023 · 0 comments
Open

Permit optional fields in proto3 #18

DazWilkin opened this issue Dec 5, 2023 · 0 comments

Comments

@DazWilkin
Copy link

"Protobuf release 3.12 adds experimental support for optional fields in proto3".

foo.proto:

syntax = "proto3";

message Foo {
    optional string id = 1;
}

But:

protoc \
--proto_path=${PWD} \
--pubsub-schema_out=${PWD} \
--pubsub-schema_opt=message-encoding-json \
--pubsub-schema_opt=schema-syntax=proto3 \
${PWD}/foo.proto

Yields:

foo.proto: is a proto3 file that contains optional fields, but code generator protoc-gen-pubsub-schema hasn't been updated to support optional fields in proto3. Please ask the owner of this code generator to support proto3 optional.

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

Successfully merging a pull request may close this issue.

1 participant