Merge pull request #13000 from brendandburns/schema-api-2

Add support for dynamic APIs
This commit is contained in:
Abhi Shah
2015-09-02 13:53:28 -07:00
25 changed files with 1522 additions and 75 deletions

View File

@@ -255,3 +255,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
}