Skip to content

Enums should default to first defined value not the one with tag = 0 #613

@robin-anil

Description

@robin-anil

On the client side I am encoding

{
   operation: 'AND',
   valueSet: [{
      dimension: 'DIMENSION_1',
      value: [2]
   }]
}

On the server (in java) I am receiving

{
    valueSet: {
      value: [605]
    }
}

Here is the proto used. Stripped down for simplicity

message Filter {
  enum Operation {
    AND = 0;
  }

  optional Operation operation = 1;
  repeated ValueSet value_set = 2;
  repeated Filter filter = 5;
}

enum Dimension {
   DIMENSION_1 = 0;
}

message ValueSet {
  optional Dimension dimension = 1;
  repeated int64 value = 2;
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions