Function: ApiRoute()
ApiRoute(
paths,version?): (target) =>void
Defined in: service-core/src/decorators/RouteDecorators.ts:74
Indicates that the decorated class contains route definitions. This prepends /api or /api/v{version} to
all provided path(s). e.g. @ApiRoute('my-api') results in /api/my-api. @ApiRoute('my-api',2) results in /api/v2/my-api`.
Parameters
paths
string | string[]
The base path(s) that all route definitions will use.
version?
string | number
The optional version number to prepend the path with. Prefixes the provided version with v in the path.
Returns
(target) => void