Page Contents

Home > @loopback/rest > ControllerRoute > (constructor)


Construct a controller based route


constructor(verb: string, path: string, spec: OperationObject, controllerCtor: ControllerClass<T>, controllerFactory?: ControllerFactory<T>, methodName?: string);


Parameter Type Description
verb string http verb
path string http request path
spec OperationObject OpenAPI operation spec
controllerCtor ControllerClass<T> Controller class
controllerFactory ControllerFactory<T> (Optional) A factory function to create a controller instance
methodName string (Optional) Controller method name, default to x-operation-name