Skip to content

Remove oneofs from ate-apiserver API #962

Closed

Description

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).

Activity

  1. juli4n commented on Aug 27, 2026

    @juli4n
    CollaboratorAuthor

    There are no oneofs in the API service messages now. Additionally, after #1274 presubmit checks will fail if an oneof field added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/apiUser-facing API changesarea/api-machinerykind/cleanupSmall fixes that are not bugs, for example a typo in a code comment

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions