We plan to use k8s declarative validation framework for validating requests in the Substrate API. The DV framework doesn't play well with proto oneofs so we need to avoid them for discriminated unions.
Oneof can be just replaced with two message-type fields (for each option) plus an optional string discriminator field.
Today we use oneof in a couple of places:
EnvVar source (only one value: string).
Volume source (durable dir or external volume template).
We plan to use k8s declarative validation framework for validating requests in the Substrate API. The DV framework doesn't play well with proto oneofs so we need to avoid them for discriminated unions.
Oneof can be just replaced with two message-type fields (for each option) plus an optional string discriminator field.
Today we use oneof in a couple of places:
EnvVarsource (only one value: string).Volumesource (durable dir or external volume template).