mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
fix nit
This commit is contained in:
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"))
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user