Skip to content

required option for non-primitive types in protobuf #58

@kostysh

Description

@kostysh

The context:

  • All non-primitive types in protobuf are optional. So if it is a field that refers to another type, it's optional.
  • It's established in protobuf that compilation of a message field type is not defined as required or optional and is up to the compiler to determine how it is handled. Since protobuf 3 all fields that are primitives may be marked optional or required, but required syntax is now prohibited in proto3 as all primitives are assumed to be required unless marked optional.
  • this way non-primitive type such as Date cannot be marked as mandatory

The task:

  • investigate and figure out how to implement protobuf functionality that will allow us to mark non-primitive types as required
  • all required types including non-primitive types must be properly reflected in the autogenerated typescript code

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions