Skip to content

[F] $autoRoute

function $autoRoute(context, target): void

@autoRoute enables automatic route generation for an operation or interface.

When applied to an operation, it automatically generates the operation’s route based on path parameter metadata. When applied to an interface, it causes all operations under that scope to have auto-generated routes.

Parameters

ParameterType
contextDecoratorContext
targetInterface | Operation

Returns

void