Skip to content
API/FastapiResponseOptions

FastapiResponseOptions

src/models/response-options.tsclass

Pre-configured ResponseOptions for the FastAPI driver

fastapi-pagination’s Page envelope is flat: { items, total, page, size, pages }. fastapi_pagination.links.Page adds a links block, { first, last, self, next, prev }, so the URL paths point into it and resolve to undefined on a plain Page. The envelope carries no from/to indices: the strategy derives them from page × size and the rows returned, and ignores options.from and options.to. Keys renamed on the server through UseFieldsAliases are mapped through PaginationConfig (dot notation supported).

new FastapiResponseOptions(options: PaginationConfig)
Parameter Type Description
options PaginationConfig —
Property Type Description
currentPage string —
data string —
firstPageUrl string —
from string —
lastPage string —
lastPageUrl string —
nextPageUrl string —
path string —
perPage string —
prevPageUrl string —
to string —
total string —