register Paginated
inline fun <Req, T, ReqH, ResH, PathP, QueryP, CookieP> ApiContract<Req, PaginatedResponse<T>, ReqH, ResH, PathP, QueryP, CookieP>.registerPaginated(filter: Filter = Filter.NoOp, crossinline handler: context(Request, Raise<Issue>, ReqH, CookieP, Principal) ApiContract<Req, PaginatedResponse<T>, ReqH, ResH, PathP, QueryP, CookieP>.(Req, PathP, QueryP, Pagination) -> ApiResponse<List<T>, ResH>): RoutingHttpHandler
Creates a route for the given ApiContract that returns a paginated response with a Pagination context.
The route will automatically handle page and limit query parameters to slice the list. If the Pagination.totalItems value provided in context is set, the framework knows the list is already filtered and won't attempt to slice it in memory.
Parameters
filter
The filter to apply to the route.
handler
The handler function for the route.