Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 68 for XValidations (0.21 sec)

  1. staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresourcedefinition/strategy_test.go

    							Type: "object",
    							XValidations: apiextensions.ValidationRules{
    								{
    									Rule:    "size(self) > 0",
    									Message: "openAPIV3Schema should contain more than 0 element.",
    								},
    							},
    							Properties: map[string]apiextensions.JSONSchemaProps{
    								"subRule": {
    									Type: "object",
    									XValidations: apiextensions.ValidationRules{
    										{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 44.6K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/validation_test.go

    			fuzzer.Fuzz(&vv.ValidationExtensions.XValidations)
    			errs := validateNestedValueValidation(&vv, false, false, fieldLevel, nil, opts)
    			if allowedNestedXValidations {
    				if len(errs) != 0 {
    					t.Errorf("unexpected XValidations validation errors for: %#v", vv)
    				}
    			} else if len(errs) == 0 && len(vv.ValidationExtensions.XValidations) != 0 {
    				t.Errorf("expected XValidations validation errors for: %#v", vv)
    			}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 31 18:20:00 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresourcedefinition/strategy.go

    // dropOptionalOldSelfField drops field optionalOldSelf from CRD schema
    func dropOptionalOldSelfField(schema *apiextensions.JSONSchemaProps) {
    	if schema == nil {
    		return
    	}
    	for i := range schema.XValidations {
    		schema.XValidations[i].OptionalOldSelf = nil
    	}
    
    	if schema.AdditionalProperties != nil {
    		dropOptionalOldSelfField(schema.AdditionalProperties.Schema)
    	}
    	for def, jsonSchema := range schema.Properties {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Feb 28 19:06:46 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/jsonschemaprops.go

    	b.XMapType = &value
    	return b
    }
    
    // WithXValidations sets the XValidations field in the declarative configuration to the given value
    // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    // If called multiple times, the XValidations field is set to the value of the last call.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Aug 28 12:38:10 UTC 2023
    - 25.2K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/compilation.go

    	t := time.Now()
    	defer func() {
    		metrics.Metrics.ObserveCompilation(time.Since(t))
    	}()
    
    	if len(s.XValidations) == 0 {
    		return nil, nil
    	}
    	celRules := s.XValidations
    
    	oldSelfEnvSet, optionalOldSelfEnvSet, err := prepareEnvSet(baseEnvSet, declType)
    	if err != nil {
    		return nil, err
    	}
    	estimator := newCostEstimator(declType)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 16 20:13:14 UTC 2024
    - 13.8K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/jsonschemaprops.go

    	b.XMapType = &value
    	return b
    }
    
    // WithXValidations sets the XValidations field in the declarative configuration to the given value
    // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    // If called multiple times, the XValidations field is set to the value of the last call.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Aug 28 12:38:10 UTC 2023
    - 25.2K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/validation/cel_validation.go

    var unbounded *uint64 = nil
    
    // CELSchemaContext keeps track of data used by x-kubernetes-validations rules for a specific schema node.
    type CELSchemaContext struct {
    	// withinValidationRuleScope is true if the schema at the current level or above have x-kubernetes-validations rules. typeInfo
    	// should only be populated for schema nodes where this is true.
    	withinValidationRuleScope bool
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 10 22:05:55 UTC 2022
    - 13.8K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/validation.go

    }
    
    // validator creates a Validator for all x-kubernetes-validations at the level of the provided schema and lower and
    // returns the Validator if any x-kubernetes-validations exist in the schema, or nil if no x-kubernetes-validations
    // exist. declType is expected to be a CEL DeclType corresponding to the structural schema.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 20 18:21:31 UTC 2024
    - 32.2K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/validation/validation_test.go

    		{name: "immutability transition rule",
    			schema: apiextensions.JSONSchemaProps{
    				Type: "object",
    				Properties: map[string]apiextensions.JSONSchemaProps{
    					"field": {
    						Type: "string",
    						XValidations: []apiextensions.ValidationRule{
    							{
    								Rule: "self == oldSelf",
    							},
    						},
    					},
    				},
    			},
    			objects: []interface{}{
    				map[string]interface{}{"field": "x"},
    			},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 18 04:49:59 UTC 2023
    - 24.8K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/validation/validation.go

    	}
    	if len(in.XValidations) != 0 {
    		var serializationValidationRules apiextensionsv1.ValidationRules
    		if err := apiextensionsv1.Convert_apiextensions_ValidationRules_To_v1_ValidationRules(&in.XValidations, &serializationValidationRules, nil); err != nil {
    			return err
    		}
    		out.VendorExtensible.AddExtension("x-kubernetes-validations", convertSliceToInterfaceSlice(serializationValidationRules))
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 24 18:23:28 UTC 2023
    - 15K bytes
    - Viewed (0)
Back to top