Skip to content

Remove discriminator fields from union types #1397

Closed

Description

We should update the style guide (and the API validation guide) and clarify how to handle union types.

  • Don't use proto oneof.
  • Each union member is wrapped into a message. If it's a primitive type, it should be proto optional.
  • No discriminator field.
  • Validate using k8s:unionMember.

This task is to update the style guide and make sure the code adheres to it. I think the only case where we have discriminator field today is in ActorTemplate.volume (field type).

Metadata

Metadata

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