Documentation
¶
Index ¶
- Variables
- func FieldShouldPick(t reflect.Type, fieldName string) bool
- func PatchSchemaValidation(s jsonschema.Schema, opt validation.Option) (jsonschema.Schema, error)
- func RegisterFieldFilter(t reflect.Type, fieldFilter FieldFilter)
- func SchemaFrom(ctx context.Context, v any, def bool) jsonschema.Schema
- func SchemaFromType(ctx context.Context, t reflect.Type, opt Opt) (s jsonschema.Schema)
- func SetTitleOrDescription(metadata *jsonschema.Metadata, lines []string)
- type FieldExclude
- type FieldFilter
- type K8sAPIVersionGetter
- type K8sKindGetter
- type K8sObjectKindGetter
- type Opt
- type SchemaRegister
- type TypeName
Constants ¶
This section is empty.
Variables ¶
View Source
var ( WithSchemaRegister = contextx.With[tCtxRegister, SchemaRegister] MustSchemaRegister = contextx.Must[tCtxRegister, SchemaRegister] CarrySchemaRegister = contextx.Carry[tCtxRegister, SchemaRegister] )
Functions ¶
func PatchSchemaValidation ¶
func PatchSchemaValidation(s jsonschema.Schema, opt validation.Option) (jsonschema.Schema, error)
func RegisterFieldFilter ¶
func RegisterFieldFilter(t reflect.Type, fieldFilter FieldFilter)
func SchemaFrom ¶
func SchemaFromType ¶
func SetTitleOrDescription ¶
func SetTitleOrDescription(metadata *jsonschema.Metadata, lines []string)
Types ¶
type FieldExclude ¶
type FieldExclude func(fields ...string)
type FieldFilter ¶
type K8sAPIVersionGetter ¶
type K8sAPIVersionGetter interface {
GetAPIVersion() string
}
type K8sKindGetter ¶
type K8sKindGetter interface {
GetKind() string
}
type K8sObjectKindGetter ¶
type K8sObjectKindGetter interface {
GetObjectKind() schema.ObjectKind
}
type Opt ¶
func (Opt) WithEnumInDoc ¶
type SchemaRegister ¶
type SchemaRegister interface {
RegisterSchema(ref string, s jsonschema.Schema)
RefString(ref string) string
Record(typeRef string) bool
}
func SchemaRegisterFrom ¶
func SchemaRegisterFrom(ctx context.Context) SchemaRegister
Click to show internal directories.
Click to hide internal directories.