Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for WithMaxItems (0.17 sec)

  1. staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/jsonschemaprops.go

    	b.Pattern = &value
    	return b
    }
    
    // WithMaxItems sets the MaxItems 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 MaxItems field is set to the value of the last call.
    func (b *JSONSchemaPropsApplyConfiguration) WithMaxItems(value int64) *JSONSchemaPropsApplyConfiguration {
    	b.MaxItems = &value
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Aug 28 12:38:10 UTC 2023
    - 25.2K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/celcoststability_test.go

    				})),
    				"mapOfListMap": withMaxProperties(mapType(
    					ptr.To(withMaxItems(listMapType([]string{"k"},
    						objectTypePtr(map[string]schema.Structural{
    							"k": stringType,
    							"v": stringType,
    						}),
    					), ptr.To[int64](10))),
    				), ptr.To[int64](10)),
    				"mapOfList": withMaxProperties(mapType(
    					ptr.To(withMaxItems(listType(&stringType), ptr.To[int64](10))),
    				), ptr.To[int64](10)),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Feb 28 19:20:16 UTC 2024
    - 80.2K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/jsonschemaprops.go

    	b.Pattern = &value
    	return b
    }
    
    // WithMaxItems sets the MaxItems 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 MaxItems field is set to the value of the last call.
    func (b *JSONSchemaPropsApplyConfiguration) WithMaxItems(value int64) *JSONSchemaPropsApplyConfiguration {
    	b.MaxItems = &value
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Aug 28 12:38:10 UTC 2023
    - 25.2K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/compilation_test.go

    			expectedSetCost:  11,
    		},
    		{
    			name: "extended library join",
    			schemaGenerator: func(max *int64) *schema.Structural {
    				strType := withMaxLength(primitiveType("string", ""), max)
    				array := withMaxItems(arrayType("atomic", nil, &strType), max)
    				array = withRule(array, "self.join(' ') == 'aa bb'")
    				return &array
    			},
    			expectedCalcCost: 329853068905,
    			setMaxElements:   10,
    			expectedSetCost:  43,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 16 20:13:14 UTC 2024
    - 51.5K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiextensions-apiserver/pkg/controller/openapi/v2/conversion_test.go

    			expected: new(spec.Schema).
    				WithPattern(testStr),
    		},
    		{
    			name: "maxItems",
    			in: &apiextensions.JSONSchemaProps{
    				MaxItems: &testInt64,
    			},
    			expected: new(spec.Schema).
    				WithMaxItems(testInt64),
    		},
    		{
    			name: "minItems",
    			in: &apiextensions.JSONSchemaProps{
    				MinItems: &testInt64,
    			},
    			expected: new(spec.Schema).
    				WithMinItems(testInt64),
    		},
    		{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 02 14:34:26 UTC 2023
    - 23.2K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/validation/validation_test.go

    		{
    			name: "object inside array",
    			schema: []*apiextensions.JSONSchemaProps{
    				withMaxItems(genArraySchema(), int64ptr(3)),
    				genObjectSchema(),
    			},
    			expectedMaxCardinality: uint64ptr(3),
    		},
    		{
    			name: "map inside object inside array",
    			schema: []*apiextensions.JSONSchemaProps{
    				withMaxItems(genArraySchema(), int64ptr(2)),
    				genObjectSchema(),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 349.4K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/validation_test.go

    	if s.ValueValidation == nil {
    		s.ValueValidation = &schema.ValueValidation{}
    	}
    	s.ValueValidation.MaxLength = maxLength
    	return s
    }
    
    func withMaxItems(s schema.Structural, maxItems *int64) schema.Structural {
    	if s.ValueValidation == nil {
    		s.ValueValidation = &schema.ValueValidation{}
    	}
    	s.ValueValidation.MaxItems = maxItems
    	return s
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 17:14:10 UTC 2024
    - 159.9K bytes
    - Viewed (0)
Back to top