<div dir="ltr"><div><span style="font-size:13px">Hi, we've been involved in a small discussion about a way to generalize query parameters handling (with the focus on making it easier to write new endpoints, and repeat code less).</span></div><span style="font-size:13px"><div><span style="font-size:13px"><br></span></div><div>In the process I declared some 'reserved' keywords that are clearly described on each related bug.</div><div><span style="font-size:13px"><br></span></div>I put things together from some of those conversations in bug 19410. This probably explains the dependencies:</span><div style="font-size:13px"><br></div><div style="font-size:13px"><a href="https://bugs.koha-community.org/bugzilla3/showdependencygraph.cgi?id=18731">https://bugs.koha-community.org/bugzilla3/showdependencygraph.cgi?id=18731</a><br></div><div style="font-size:13px"><br></div><div style="font-size:13px">Follow the dependencies to better track what's done so far.</div><div style="font-size:13px"><br></div><div style="font-size:13px">Here you can see it "in action" on the list_orders controller method:</div><div style="font-size:13px"><a href="https://github.com/tomascohen/koha/blob/bug_18731_orders_endpoint/Koha/REST/V1/Acquisitions/Orders.pm#L26-L52">https://github.com/tomascohen/koha/blob/bug_18731_orders_endpoint/Koha/REST/V1/Acquisitions/Orders.pm#L26-L52</a><br></div><div style="font-size:13px"><br></div><div style="font-size:13px">And this is how the OpenAPI path definition looks like with the 'reserved' params:</div><div style="font-size:13px"><a href="https://github.com/tomascohen/koha/blob/bug_18731_orders_endpoint/api/v1/swagger/paths/acquisitions_orders.json#L35-L42">https://github.com/tomascohen/koha/blob/bug_18731_orders_endpoint/api/v1/swagger/paths/acquisitions_orders.json#L35-L42</a><br></div><div style="font-size:13px"><br></div><div style="font-size:13px">And the parameters definition [1]:</div><div style="font-size:13px"><a href="https://github.com/tomascohen/koha/blob/bug_18731_orders_endpoint/api/v1/swagger/parameters.json#L17-L50">https://github.com/tomascohen/koha/blob/bug_18731_orders_endpoint/api/v1/swagger/parameters.json#L17-L50</a><br></div><div style="font-size:13px"><br></div><div style="font-size:13px">Thanks in advance for your feedback and testing.</div><div style="font-size:13px"><br></div><div style="font-size:13px">[1] Yes, there's room for modularization (parameters/reserved.json?). Help is welcome.</div><br class="inbox-inbox-Apple-interchange-newline"></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>