Skip to content

Permit optional fields in proto3 #18

@DazWilkin

Description

@DazWilkin

"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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions