Add a REST hook for post-validation canonicalize

This is a simple hook that only Endpoints uses for now.
This commit is contained in:
Tim Hockin
2015-11-12 21:13:16 -08:00
parent 927f30b0a5
commit 35ab5c6234
25 changed files with 113 additions and 11 deletions

View File

@@ -82,6 +82,10 @@ func (namespaceStrategy) Validate(ctx api.Context, obj runtime.Object) fielderro
return validation.ValidateNamespace(namespace)
}
// Canonicalize normalizes the object after validation.
func (namespaceStrategy) Canonicalize(obj runtime.Object) {
}
// AllowCreateOnUpdate is false for namespaces.
func (namespaceStrategy) AllowCreateOnUpdate() bool {
return false