[Bug 538011] [task] Refactor rest-service/plugins/patch