[FOLIO-1412] make "limit" parameter required Created: 13/Aug/18  Updated: 15/Jan/19

Status: Open
Project: FOLIO
Components: None
Affects versions: None
Fix versions: None

Type: Task Priority: P3
Reporter: Jakub Skoczen Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: core, sprint44, sprint45
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Sprint:
Development Team: Core: Platform

 Description   

We discussed that the "limit" setting for collection endpoints has no meaningful default and in most cases depends on the client (UI) context (e.g controlled vocab may have a pageable display under settings but different control is used when showing the values in place).

To avoid breaking changes we can consider this change only for future endpoints.

Marc Johnson Adam Dickmeiss Mike Taylor Niels Erik Nielsen



 Comments   
Comment by Adam Dickmeiss [ 13/Aug/18 ]

So you are going to require limit toi be set by clients? What about offset, then?

Comment by Mike Taylor [ 13/Aug/18 ]

Offset defaulting to zero is fine: there is really no other default that would make sense.

Whereas there is not really an argument that can be made for (say) 10 as the default count ahead of 20 or 5.

Comment by Mike Taylor [ 13/Aug/18 ]

(This arose from the observation that the client should really always specify its own limit – there are no circumstances in which it makes sense to just say "Oh, I'll have however many the server wants to give me" – so Jakub thought it would make sense to enforce that client behaviour.)

Comment by Adam Dickmeiss [ 13/Aug/18 ]

What has trouble me was that we gave the default value for limit was specified that the maximum value was provided for both limit and offset. Makes little sense.. Btw, the limit has a minimum value of 1 in the pageable.raml trait!!! Which means that if it was enforced you'd have to ask for at least 1 record.

Comment by Mike Taylor [ 13/Aug/18 ]

I can't parse the first half of that.

But I strongly agree that the minimum value for limit should be 0, not 1. Asking for no records (because you only care about finding out the total hit-count) is a perfectly cromulent thing to do.

Generated at Thu Feb 08 23:13:09 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.