Remove duplication in RESTControllerDirective

Build a list of generators, then chain them together in
the return value of run().