Use createParamDecorator which receives a factory function with (data, ctx) arguments. The data argument is whatever is passed into the decorator at usage time, and ctx is the ExecutionContext providing access to the request, response, and other context.
createParamDecorator takes a factory function that receives data and ctx.
data is the argument passed to the decorator at the call site.
ctx.switchToHttp().getRequest() gives the underlying HTTP request.
Custom param decorators can be combined with pipes for validation.