dolanor / rip

REST in peace
BSD 3-Clause "New" or "Revised" License
68 stars 0 forks source link

Configure page size/count and page max size #14

Closed dolanor closed 4 months ago

dolanor commented 4 months ago

I just added pagination, for now, it just accepts a page query parameter. It bases on rip.RouteOptions.WithListPageSize value to get a limit and offset that it passes to rip.EntityProvider.List method.

But we might want to let users define the page size they want/need. But also, we should have an option to limit the max page size that users could ask for to avoid some bad behaviour or expensive mistakes.

The behaviour would be that if a user would ask for too high a page size, we would reply with a 400 and details about the query parameter that is not correct.