In addition to being able to GET a specific authority, we should be able to search and retrieve subsets of authorities
Created attachment 147492 [details] [review] Bug 32735: Add endpoint to list authorities
Created attachment 147493 [details] [review] Bug 32735: Add endpoint to list authorities This patch adds an endpoint to list authorities To test: 1. apply patch 2. enable basic auth 3. call to GET /api/v1/authorities with the following Accept headers: * application/json * application/marcxml+xml * application/marc-in-json * application/marc * text/plain 4. notice how data changes with each Accept header 5. prove t/db_dependent/api/v1/authorities.t 6. sign off
The patch no longer applies 8-(.. git bz apply 32735 Bug 32735 - REST API: Add a list endpoint for Authorities 147493 - Bug 32735: Add endpoint to list authorities Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 32735: Add endpoint to list authorities error: sha1 information is lacking or useless (Koha/REST/V1/Authorities.pm). error: could not build fake ancestor Patch failed at 0001 Bug 32735: Add endpoint to list authorities
Created attachment 149703 [details] [review] Bug 32735: Add endpoint to list authorities This patch adds an endpoint to list authorities To test: 1. apply patch 2. enable basic auth 3. call to GET /api/v1/authorities with the following Accept headers: * application/json * application/marcxml+xml * application/marc-in-json * application/marc * text/plain 4. notice how data changes with each Accept header 5. prove t/db_dependent/api/v1/authorities.t 6. sign off
Created attachment 149705 [details] [review] Bug 32735: Add endpoint to list authorities This patch adds an endpoint to list authorities To test: 1. apply patch 2. enable basic auth 3. call to GET /api/v1/authorities with the following Accept headers: * application/json * application/marcxml+xml * application/marc-in-json * application/marc * text/plain 4. notice how data changes with each Accept header 5. prove t/db_dependent/api/v1/authorities.t 6. sign off Signed-off-by: David Nind <david@davidnind.com>
Testing notes (using KTD): 1. Used Postman to send requests. 2. 20 results are returned for each of the different Accept headers. 3. The tests pass.
We might need a follow-up for UNIMARC authorities as of bug 33329.
Created attachment 150615 [details] [review] Bug 32735: Add endpoint to list authorities This patch adds an endpoint to list authorities To test: 1. apply patch 2. enable basic auth 3. call to GET /api/v1/authorities with the following Accept headers: * application/json * application/marcxml+xml * application/marc-in-json * application/marc * text/plain 4. notice how data changes with each Accept header 5. prove t/db_dependent/api/v1/authorities.t 6. sign off Signed-off-by: David Nind <david@davidnind.com>
Created attachment 150616 [details] [review] Bug 32735: (follow-up) Make Koha::Objects::Record::Collections->print_collection work with Authorities and Biblios
Created attachment 150746 [details] [review] Bug 32735: Add endpoint to list authorities This patch adds an endpoint to list authorities To test: 1. apply patch 2. enable basic auth 3. call to GET /api/v1/authorities with the following Accept headers: * application/json * application/marcxml+xml * application/marc-in-json * application/marc * text/plain 4. notice how data changes with each Accept header 5. prove t/db_dependent/api/v1/authorities.t 6. sign off Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 150747 [details] [review] Bug 32735: (follow-up) Make Koha::Objects::Record::Collections->print_collection work with Authorities and Biblios Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Pushed to master for 23.05. Nice work everyone, thanks!
As the dependency states.. if we want this for 22.11 let me know and we can backport as a full set. Otherwise, not backporting for now.