<div dir="ltr">Hi there, I'm currently implementing a couple endpoints for acquisitions-related stuff and also QAing existing patches introducing endpoints.<div><br></div><div>One of the things that need to be done (which I did for my own endpoint for vendors / bug 18120) is migrating them to Mojolicious::Plugin::OpenAPI instead of (the deprecated) Mojolicious::Plugin::Swagger2.<div><br></div><div>I noticed there's lack of a generic way to deal with pagination. There are a couple options we could consider, but I would like to hear the opinion of UI people, which are the ones that will take advantage or suffer what we do on the backend :-D</div></div><div><br></div><div>a)  GET /patrons?page=1&per_page=3 => [ {borrower1}, {borrower2}, {borrower3} ]</div><div>b)  GET /patrons?offset=0&limit=3 => [ {borrower1}, {borrower2}, {borrower3} ]<br></div><div><br></div><div>Lari proposed another one, which tackles an issue we could have on the UI (knowing the total, calculating pages, etc):</div><div><br></div><div>c) GET /patrons?page=1&per_page=3 { total: 50000, results: [ {borrower1}, {borrower2}, {borrower3} ] }</div><div><br></div><div>(c) has the problem that it would mean we need to change the current resposes for list operations on the already implemented endpoints. I'm not sure at this point we would need to shift api version (v2?), I would vote against, but here we have the chance to hear people using the API.</div><div><br></div><div>Looking forward to your comments as my current dev work completion depends on it :-D</div><div><br></div></div><div dir="ltr">-- <br></div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div style="color:rgb(117,117,117);font-family:"helvetica neue",helvetica,arial,sans-serif;font-size:12.8px">Tomás Cohen Arazi</div><div style="color:rgb(117,117,117);font-family:"helvetica neue",helvetica,arial,sans-serif;font-size:12.8px">Theke Solutions (<a href="http://theke.io/">https://theke.io</a>)<br>✆ +54 9351 3513384<br>GPG: B2F3C15F</div></div></div>