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

@@ -81,6 +81,10 @@ func (rcStrategy) Validate(ctx api.Context, obj runtime.Object) fielderrors.Vali
return validation.ValidateReplicationController(controller)
}
// Canonicalize normalizes the object after validation.
func (rcStrategy) Canonicalize(obj runtime.Object) {
}
// AllowCreateOnUpdate is false for replication controllers; this means a POST is
// needed to create one.
func (rcStrategy) AllowCreateOnUpdate() bool {