Versions in this module Expand all Collapse all v0 v0.0.1 Sep 23, 2026 Changes in this version + const FieldNotFound + const Internal + const InvalidArgument + const InvalidCRD + const InvalidRule + const NotDescribed + const NotFound + const NotStruct + const OK + const OpenAPIVersion + const RecursiveType + const RuleKindMismatch + const SchemaConflict + const SchemaConvert + const SourceLoad + const Unimplemented + const Unknown + const UnsupportedType + func Add(c CRD) + func Code(err error) codes.Code + func Marshal(obj *apiextv1.CustomResourceDefinition) ([]byte, error) + func Register(v any) error + func RegisterSchema(v any, schema apiextv1.JSONSchemaProps) error + func Schema(key string) (*apiextv1.JSONSchemaProps, error) + func SchemaFor[T any]() (*apiextv1.JSONSchemaProps, error) + func SetDERSource(sources ...fs.FS) + func SetKubebuildTag(key, value string) + type Array interface + func NewArray(items Rule) Array + type ArrayField interface + type ArrayOf interface + Items func(rule Rule) S + ListMapKeys func(keys ...string) S + ListType func(t string) S + MaxItems func(n int64) S + MinItems func(n int64) S + UniqueItems func() S + type Bool interface + func NewBool() Bool + type BoolField interface + type BoolOf interface + Default func(v bool) S + type Builder interface + Array func(field any) ArrayField + Bool func(field any) BoolField + DurationSeconds func(field any, lo, hi int64) IntegerField + HTTPSURL func(field any) StringField + IntOrString func(field any) IntOrStringField + Integer func(field any) IntegerField + K8sName func(field any) StringField + Map func(field any) MapField + NonEmptyString func(field any) StringField + Number func(field any) NumberField + Object func(field any) ObjectField + Percent func(field any) IntegerField + Port func(field any) IntegerField + Raw func(field any) RawField + Self func() Object + String func(field any) StringField + Use func(field any, r Rule) Field + type CRD interface + Annotation func(key, value string) CRD + Build func() (*apiextv1.CustomResourceDefinition, error) + Categories func(categories ...string) CRD + ConversionWebhook func(cfg apiextv1.WebhookClientConfig, reviewVersions ...string) CRD + Encode func(w io.Writer) error + Err func() error + Group func(group string) CRD + GroupVersionKind func(version string) schema.GroupVersionKind + GroupVersionResource func(version string) schema.GroupVersionResource + HasStatus func(version string) bool + Kind func(kind string) CRD + Label func(key, value string) CRD + Namespaced func() bool + Plural func(plural string) CRD + Scope func(scope apiextv1.ResourceScope) CRD + ShortNames func(names ...string) CRD + Singular func(singular string) CRD + Version func(name string, served, storage bool, opts ...VersionOption) CRD + func List() []CRD + func New[T any]() CRD + type CommonOf interface + Description func(s string) S + Example func(v any) S + Nullable func() S + Title func(s string) S + XValidation func(rule, message string) S + type Describer interface + CRD func(b Builder) error + type Field interface + Description func(s string) Field + Optional func() Field + Required func() Field + type FieldOf interface + Optional func() S + Required func() S + type IntOrString interface + func NewIntOrString() IntOrString + type IntOrStringField interface + type Integer interface + func DurationSeconds(lo, hi int64) Integer + func NewInteger() Integer + func Percent() Integer + func Port() Integer + type IntegerBranch interface + Enum func(values ...int64) IntegerBranch + Maximum func(n int64) IntegerBranch + Minimum func(n int64) IntegerBranch + MultipleOf func(n int64) IntegerBranch + type IntegerField interface + type IntegerOf interface + AllOf func() IntegerBranch + AnyOf func() IntegerBranch + Default func(v int64) S + Enum func(values ...int64) S + ExclusiveMaximum func() S + ExclusiveMinimum func() S + Format func(f formats.Format) S + Maximum func(n int64) S + Minimum func(n int64) S + MultipleOf func(n int64) S + Not func() IntegerBranch + OneOf func() IntegerBranch + type Map interface + func NewMap(values Rule) Map + type MapField interface + type MapOf interface + MapType func(t string) S + MaxProperties func(n int64) S + MinProperties func(n int64) S + Values func(rule Rule) S + type Number interface + func NewNumber() Number + type NumberBranch interface + Enum func(values ...float64) NumberBranch + Maximum func(n float64) NumberBranch + Minimum func(n float64) NumberBranch + MultipleOf func(n float64) NumberBranch + type NumberField interface + type NumberOf interface + AllOf func() NumberBranch + AnyOf func() NumberBranch + Default func(v float64) S + Enum func(values ...float64) S + ExclusiveMaximum func() S + ExclusiveMinimum func() S + Format func(f formats.Format) S + Maximum func(n float64) S + Minimum func(n float64) S + MultipleOf func(n float64) S + Not func() NumberBranch + OneOf func() NumberBranch + type Object interface + type ObjectBranch interface + RequiredFields func(names ...string) ObjectBranch + type ObjectField interface + type ObjectOf interface + AnyOf func() ObjectBranch + EmbeddedResource func() S + MapType func(t string) S + MaxProperties func(n int64) S + MinProperties func(n int64) S + OneOf func() ObjectBranch + PreserveUnknownFields func() S + type OpenAPIComponents struct + Schemas map[string]apiextv1.JSONSchemaProps + type OpenAPIConfig struct + Prefixes []Prefix + Title string + Version string + type OpenAPIDocument struct + Components OpenAPIComponents + Info OpenAPIInfo + OpenAPI string + Paths map[string]any + func OpenAPI(cfg OpenAPIConfig, defs ...CRD) (*OpenAPIDocument, error) + func (d *OpenAPIDocument) JSON() ([]byte, error) + func (d *OpenAPIDocument) YAML() ([]byte, error) + type OpenAPIInfo struct + Title string + Version string + type Prefix struct + From string + To string + type Raw interface + func NewRaw() Raw + type RawField interface + type RawOf interface + EmbeddedResource func() S + type Rule interface + Schema func() (apiextv1.JSONSchemaProps, error) + func Of[T any]() Rule + type Ruler interface + Rule func() (Rule, error) + type String interface + func HTTPSURL() String + func K8sName() String + func NewString() String + func NonEmptyString() String + type StringBranch interface + Enum func(values ...string) StringBranch + Format func(f string) StringBranch + MaxLength func(n int64) StringBranch + MinLength func(n int64) StringBranch + Pattern func(p string) StringBranch + type StringField interface + type StringOf interface + AllOf func() StringBranch + AnyOf func() StringBranch + Default func(v string) S + Enum func(values ...string) S + Format func(f formats.Format) S + MaxLength func(n int64) S + MinLength func(n int64) S + Not func() StringBranch + OneOf func() StringBranch + Pattern func(p string) S + type VersionOption func(v *version) + func Deprecated(warning string) VersionOption + func PrinterColumn(name, typ, jsonPath string) VersionOption + func PrinterColumnDef(def apiextv1.CustomResourceColumnDefinition) VersionOption + func Scale(specReplicasPath, statusReplicasPath, labelSelectorPath string) VersionOption + func Status() VersionOption + func VersionType[T any]() VersionOption