Re: [Koha-devel] REST API : PUT for partial update

2024-03-21 Thread Tomas Cohen Arazi via Koha-devel
Setting a null value willl set it to null, if nullable. Yes! El jue, 21 mar 2024 a las 10:07, Fridolin SOMERS via Koha-devel (< koha-devel@lists.koha-community.org>) escribió: > > > Le 21/03/2024 à 11:18, Fridolin SOMERS via Koha-devel a écrit : > > OK > > > > But currently this means in PUT you

Re: [Koha-devel] REST API : PUT for partial update

2024-03-21 Thread Fridolin SOMERS via Koha-devel
Le 21/03/2024 à 11:18, Fridolin SOMERS via Koha-devel a écrit : OK But currently this means in PUT you need to add in body the required fields (even when unchanged) and the fields you want to change. Missing fields are kept unchanged right ? So there is no way to blank a field ? Looks like

Re: [Koha-devel] REST API : PUT for partial update

2024-03-21 Thread Fridolin SOMERS via Koha-devel
OK But currently this means in PUT you need to add in body the required fields (even when unchanged) and the fields you want to change. Missing fields are kept unchanged right ? So there is no way to blank a field ? The need was updating patron expiration date. So maybe better create a

Re: [Koha-devel] REST API : PUT for partial update

2024-03-20 Thread Tomas Cohen Arazi via Koha-devel
When we decided to implement the RESTful API, we agreed PUT is for 'replacing' resources, and PATCH for updating selected pieces of them. I personally never managed to wrap my mind around PATCH and how to validate what tiny bit is allowed to be patched or not. As OpenAPIv2 is not that flexible.