controller-tools
controller-tools copied to clipboard
🐛 pkg/crd: support validation on type alias to basic types
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.