apiserverk8s.io/apiserver/pkg/cel/openapi Index | Files | Directories

package openapi

import "k8s.io/apiserver/pkg/cel/openapi"

Index

Functions

func MakeMapList

func MakeMapList(sts *spec.Schema, items []interface{}) (rv common.MapList)

func SchemaDeclType

func SchemaDeclType(s *spec.Schema, isResourceRoot bool) *apiservercel.DeclType

func UnstructuredToVal

func UnstructuredToVal(unstructured any, schema *spec.Schema) ref.Val

Types

type Schema

type Schema struct {
	Schema *spec.Schema
}

func (*Schema) AdditionalProperties

func (s *Schema) AdditionalProperties() common.SchemaOrBool

func (*Schema) AllOf

func (s *Schema) AllOf() []common.Schema

func (*Schema) AnyOf

func (s *Schema) AnyOf() []common.Schema

func (*Schema) Default

func (s *Schema) Default() any

func (*Schema) Enum

func (s *Schema) Enum() []any

func (*Schema) Format

func (s *Schema) Format() string

func (*Schema) IsExclusiveMaximum

func (s *Schema) IsExclusiveMaximum() bool

func (*Schema) IsExclusiveMinimum

func (s *Schema) IsExclusiveMinimum() bool

func (*Schema) IsXEmbeddedResource

func (s *Schema) IsXEmbeddedResource() bool

func (*Schema) IsXIntOrString

func (s *Schema) IsXIntOrString() bool

func (*Schema) IsXPreserveUnknownFields

func (s *Schema) IsXPreserveUnknownFields() bool

func (*Schema) Items

func (s *Schema) Items() common.Schema

func (*Schema) MaxItems

func (s *Schema) MaxItems() *int64

func (*Schema) MaxLength

func (s *Schema) MaxLength() *int64

func (*Schema) MaxProperties

func (s *Schema) MaxProperties() *int64

func (*Schema) Maximum

func (s *Schema) Maximum() *float64

func (*Schema) MinItems

func (s *Schema) MinItems() *int64

func (*Schema) MinLength

func (s *Schema) MinLength() *int64

func (*Schema) MinProperties

func (s *Schema) MinProperties() *int64

func (*Schema) Minimum

func (s *Schema) Minimum() *float64

func (*Schema) MultipleOf

func (s *Schema) MultipleOf() *float64

func (*Schema) Not

func (s *Schema) Not() common.Schema

func (*Schema) Nullable

func (s *Schema) Nullable() bool

func (*Schema) OneOf

func (s *Schema) OneOf() []common.Schema

func (*Schema) Pattern

func (s *Schema) Pattern() string

func (*Schema) Properties

func (s *Schema) Properties() map[string]common.Schema

func (*Schema) Required

func (s *Schema) Required() []string

func (*Schema) Type

func (s *Schema) Type() string

func (*Schema) UniqueItems

func (s *Schema) UniqueItems() bool

func (*Schema) WithTypeAndObjectMeta

func (s *Schema) WithTypeAndObjectMeta() common.Schema

func (*Schema) XListMapKeys

func (s *Schema) XListMapKeys() []string

func (*Schema) XListType

func (s *Schema) XListType() string

func (*Schema) XMapType

func (s *Schema) XMapType() string

func (*Schema) XValidations

func (s *Schema) XValidations() []common.ValidationRule

type SchemaOrBool

type SchemaOrBool struct {
	SchemaOrBool *spec.SchemaOrBool
}

func (*SchemaOrBool) Allows

func (sb *SchemaOrBool) Allows() bool

func (*SchemaOrBool) Schema

func (sb *SchemaOrBool) Schema() common.Schema

type ValidationRule

type ValidationRule struct {
	RuleField              string `json:"rule"`
	MessageField           string `json:"message"`
	MessageExpressionField string `json:"messageExpression"`
	PathField              string `json:"fieldPath"`
}

func (ValidationRule) FieldPath

func (v ValidationRule) FieldPath() string

func (ValidationRule) Message

func (v ValidationRule) Message() string

func (ValidationRule) MessageExpression

func (v ValidationRule) MessageExpression() string

func (ValidationRule) Rule

func (v ValidationRule) Rule() string

Source Files

adaptor.go extensions.go

Directories

PathSynopsis
pkg/cel/openapi/resolver
Version
v0.33.0 (latest)
Published
Apr 23, 2025
Platform
linux/amd64
Imports
5 packages
Last checked
1 hour ago

Tools for package owners.