mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	fix nit
This commit is contained in:
		
				
					committed by
					
						
						Jennifer Buckley
					
				
			
			
				
	
			
			
			
						parent
						
							df329d87e1
						
					
				
				
					commit
					7303df0b21
				
			@@ -800,10 +800,10 @@ func ValidateCustomResourceDefinitionOpenAPISchema(schema *apiextensions.JSONSch
 | 
			
		||||
		allErrs = append(allErrs, field.NotSupported(fldPath.Child("x-kubernetes-list-type"), *schema.XListType, []string{"atomic", "set", "map"}))
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if len(schema.XListMapKeys) > 0 && (schema.XListType == nil || *schema.XListType != "map") {
 | 
			
		||||
	if len(schema.XListMapKeys) > 0 {
 | 
			
		||||
		if schema.XListType == nil {
 | 
			
		||||
			allErrs = append(allErrs, field.Required(fldPath.Child("x-kubernetes-list-type"), "must be map if x-kubernetes-list-map-keys is non-empty"))
 | 
			
		||||
		} else {
 | 
			
		||||
		} else if *schema.XListType != "map" {
 | 
			
		||||
			allErrs = append(allErrs, field.Invalid(fldPath.Child("x-kubernetes-list-type"), *schema.XListType, "must be map if x-kubernetes-list-map-keys is non-empty"))
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user