I imagine something like this, where the structure only gets changed if the page parameter is present:
{
data: [
{ /* joke 1 */ },
{ /* joke 2 */ },
{ /* joke 3 */ },
{ /* joke 4 */ },
{ /* joke 5 */ }
],
paging: {
currentPage: 1,
totalPages: 12,
totalItems: 57,
pageSize: 5,
}
}
I imagine something like this, where the structure only gets changed if the page parameter is present:
GET /jokes?page=1&page-size=5