controller-tools icon indicating copy to clipboard operation
controller-tools copied to clipboard

🐛 pkg/crd: support validation on type alias to basic types

Open mtardy opened this issue 1 year ago • 3 comments

Fixes #1071

Without the type Alias being its own type (Go 1.22 see gotypesalias), in localNamedToSchema, the link is missing.

[ Upstream port of d944debcff34 ("Support type aliasing to basic types") ]

Previously, validation schema generation was skipped on a type alias:

type A = B

Whereas, a new type was fine:

type A B

This commit implements support for generating validation schemas for type aliases to basic types, i.e. string, int, etc.

mtardy avatar Oct 21 '24 11:10 mtardy