bufbuild / protobuf-es

Protocol Buffers for ECMAScript. The only JavaScript Protobuf library that is fully-compliant with Protobuf conformance tests.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

All fields are optional in generated messages for proto2 schemas

joemckenney opened this issue · comments

When using proto2 in a project, we expect the generated code to encode the optionality of a field in a message.

Currently, all fields in the generated messages are optional (which makes sense in proto3 but doesn't quite align with a proto2 schema).

Seems to be related to #414

Spot on @czabaj, #414 is the same. Closing this one as a duplicate.