- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for WithTypeAndObjectMeta (0.3 sec)
-
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/model/schemas.go
return common.SchemaDeclType(&Structural{Structural: s}, isResourceRoot) } // WithTypeAndObjectMeta ensures the kind, apiVersion and // metadata.name and metadata.generateName properties are specified, making a shallow copy of the provided schema if needed. func WithTypeAndObjectMeta(s *schema.Structural) *schema.Structural { if s.Properties != nil && s.Properties["kind"].Type == "string" &&
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu May 16 20:13:14 UTC 2024 - 2.8K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/cel/common/adaptor.go
Default() any Validations KubeExtensions // WithTypeAndObjectMeta returns a schema that has the type and object meta set. // the type includes "kind", "apiVersion" field // the "metadata" field requires "name" and "generateName" to be set // The original schema must not be mutated. Make a copy if necessary. WithTypeAndObjectMeta() Schema } // Validations contains OpenAPI validation that the CEL library uses.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Oct 10 21:26:55 UTC 2023 - 3K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/cel/openapi/adaptor.go
return getXListMapKeys(s.Schema) } func (s *Schema) XValidations() []common.ValidationRule { return getXValidations(s.Schema) } func (s *Schema) WithTypeAndObjectMeta() common.Schema { return &Schema{common.WithTypeAndObjectMeta(s.Schema)} } func UnstructuredToVal(unstructured any, schema *spec.Schema) ref.Val { return common.UnstructuredToVal(unstructured, &Schema{schema}) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Oct 10 21:26:55 UTC 2023 - 4.9K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/cel/common/schemas.go
} func zeroIfNegative(v int64) int64 { if v < 0 { return 0 } return v } // WithTypeAndObjectMeta ensures the kind, apiVersion and // metadata.name and metadata.generateName properties are specified, making a shallow copy of the provided schema if needed. func WithTypeAndObjectMeta(s *spec.Schema) *spec.Schema { if s.Properties != nil && s.Properties["kind"].Type.Contains("string") &&
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Oct 09 18:00:45 UTC 2023 - 10.5K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/model/adaptor.go
} return result } func (s *Structural) WithTypeAndObjectMeta() common.Schema { return &Structural{Structural: WithTypeAndObjectMeta(s.Structural)}
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu May 16 20:13:14 UTC 2024 - 8.2K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/cel/common/values.go
return types.NewErr("invalid data, expected a map for the provided schema with type=object") } if schema.IsXEmbeddedResource() || schema.Properties() != nil { if schema.IsXEmbeddedResource() { schema = schema.WithTypeAndObjectMeta() } return &unstructuredMap{ value: m, schema: schema, propSchema: func(key string) (Schema, bool) { if schema, ok := schema.Properties()[key]; ok { return schema, true }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Oct 23 22:30:17 UTC 2023 - 20.5K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/validation.go
return errs, -1 } if s.isResourceRoot { sts = model.WithTypeAndObjectMeta(sts) } activation, optionalOldSelfActivation := s.celActivationFactory(sts, obj, oldObj) for i, compiled := range s.compiledRules { rule := s.uncompiledRules[i] if compiled.Error != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon May 20 18:21:31 UTC 2024 - 32.2K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/validation_test.go
}, schema: &schema.Structural{ Generic: schema.Generic{ Type: "object", }, // need to put all tests in Properties due to WithTypeAndObjectMeta // enforcing structs for all top level schemas Properties: map[string]schema.Structural{ "myProperty": { Generic: schema.Generic{ Type: "object", },
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jun 04 17:14:10 UTC 2024 - 159.9K bytes - Viewed (0)