Skip to content

[webhook] support distribution authors who want to add their custom defaulting and validation #1140

Open
@dprotaso

Description

@dprotaso

Expected Behavior

As a distribution author it should be easy to include additional defaulting & validation logic without modifying the core API types

Actual Behavior

It's actually non-trivial to add a vendor specific default & validation. We want to avoid leaking things in the upstream API types.

A potential workaround is to define your own stub type but this is error prone because

  1. When defaulting - if your stub doesn't simply passthrough all fields of the type you'll actually remove fields
  2. Keeping stubs up to date with the upstream will be tedious - ie. when new fields are added

Thus we need something better for this situation

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/APIkind/featurelifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions