Add support for installing custom object APIs
This commit is contained in:
@@ -257,3 +257,15 @@ func ValidateDeployment(obj *expapi.Deployment) errs.ValidationErrorList {
|
||||
allErrs = append(allErrs, ValidateDeploymentSpec(&obj.Spec).Prefix("spec")...)
|
||||
return allErrs
|
||||
}
|
||||
|
||||
func ValidateThirdPartyResourceDataUpdate(old, update *expapi.ThirdPartyResourceData) errs.ValidationErrorList {
|
||||
return ValidateThirdPartyResourceData(update)
|
||||
}
|
||||
|
||||
func ValidateThirdPartyResourceData(obj *expapi.ThirdPartyResourceData) errs.ValidationErrorList {
|
||||
allErrs := errs.ValidationErrorList{}
|
||||
if len(obj.Name) == 0 {
|
||||
allErrs = append(allErrs, errs.NewFieldInvalid("name", obj.Name, "name must be non-empty"))
|
||||
}
|
||||
return allErrs
|
||||
}
|
||||
|
Reference in New Issue
Block a user