-
Notifications
You must be signed in to change notification settings - Fork 4
Closed
Labels
Description
The current implementation of the OneofValidator does not allow any oneof field to be not set.
The expected behavior is that it is possible to have unset oneof fields, e.g. we have an origin_id fields in the EventContext message that may be empty by its contract:
// Meta-information for an event.
message EventContext {
...
oneof origin {
// The context of the command which generated this event.
CommandContext command_context = 2 [(required) = true];
// The context of the event which generated this event.
EventContext event_context = 6 [(required) = true];
// The event was imported using this `ActorContext`.
ActorContext import_context = 11 [(required) = true];
}
...
// An ID of the origin messsage.
//
// The case of this `oneof` is always the same as the case of `origin` (except for
// the `import_context`, which does not have a corresponding field in `origin_id`).
//
// The `origin` and `origin_id` groups are not merged for the reasons of binary compatibility.
//
oneof origin_id {
// The ID of the origin command.
CommandId command_id = 12;
// The ID of the origin event.
EventId event_id = 13;
}
...
}Reactions are currently unavailable