In addition to being able to GET a specific biblio, we should be able to search and retrieve subsets of biblios
Created attachment 146751 [details] [review] Bug 32734: Add REST endpoint to list biblios This patch adds an endpoint to list biblios To test: 1. apply patch 2. enable basic auth 3. call to GET /api/v1/biblios 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/Koha/Biblios.t t/db_dependent/api/v1/biblios.t 6. sign off
Created attachment 146804 [details] [review] Bug 32734: Add REST endpoint to list biblios This patch adds an endpoint to list biblios To test: 1. apply patch 2. enable basic auth 3. call to GET /api/v1/biblios 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/Koha/Biblios.t t/db_dependent/api/v1/biblios.t 6. sign off Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Created attachment 146855 [details] [review] Bug 32734: Add REST endpoint to list biblios This patch adds an endpoint to list biblios To test: 1. apply patch 2. enable basic auth 3. call to GET /api/v1/biblios 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/Koha/Biblios.t t/db_dependent/api/v1/biblios.t 6. sign off Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
RM found that the glue with which I joined 'txt' records was wrong... I thought it was a pretty print and didn't know there was already a standard for it, so he allowed me to do the change, and upload this patch as signed... it almost changes nothing.
Agustin, nice work here. Could you please check this: - We need tests for the 'return_resultset' parameter. - Please make sure you have the EditorConfig plugin on your vscode, you seem to be using two spaces for indentation (at least on the tests). Running perltidy on those blocks you add/edit would be even better.
*** Bug 30790 has been marked as a duplicate of this bug. ***
Created attachment 147476 [details] [review] Bug 32734: Add REST endpoint to list biblios This patch adds an endpoint to list biblios To test: 1. apply patch 2. enable basic auth 3. call to GET /api/v1/biblios 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/Koha/Biblios.t t/db_dependent/api/v1/biblios.t 6. sign off Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Bug 32734 Depends on bug 31801 (Passed QA) Follow? [(y)es, (n)o] y Bug 31801 Depends on bug 31800 (Passed QA) Follow? [(y)es, (n)o] y Bug 31800 - REST API: POST endpoint for Biblios 147714 - Bug 31800: Add REST endpoint to add a biblio Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 31800: Add REST endpoint to add a biblio Using index info to reconstruct a base tree... M api/v1/swagger/swagger.yaml Falling back to patching base and 3-way merge... Auto-merging api/v1/swagger/swagger.yaml CONFLICT (content): Merge conflict in api/v1/swagger/swagger.yaml error: Failed to merge in the changes. Patch failed at 0001 Bug 31800: Add REST endpoint to add a biblio
(In reply to Kyle M Hall from comment #8) > Bug 32734 Depends on bug 31801 (Passed QA) > Follow? [(y)es, (n)o] y > > Bug 31801 Depends on bug 31800 (Passed QA) > Follow? [(y)es, (n)o] y > > Bug 31800 - REST API: POST endpoint for Biblios > > 147714 - Bug 31800: Add REST endpoint to add a biblio > > Apply? [(y)es, (n)o, (i)nteractive] y > Applying: Bug 31800: Add REST endpoint to add a biblio > Using index info to reconstruct a base tree... > M api/v1/swagger/swagger.yaml > Falling back to patching base and 3-way merge... > Auto-merging api/v1/swagger/swagger.yaml > CONFLICT (content): Merge conflict in api/v1/swagger/swagger.yaml > error: Failed to merge in the changes. > Patch failed at 0001 Bug 31800: Add REST endpoint to add a biblio Maybe I just pushed that one?
(In reply to Kyle M Hall from comment #8) > Bug 32734 Depends on bug 31801 (Passed QA) > Follow? [(y)es, (n)o] y > > Bug 31801 Depends on bug 31800 (Passed QA) > Follow? [(y)es, (n)o] y > > Bug 31800 - REST API: POST endpoint for Biblios > > 147714 - Bug 31800: Add REST endpoint to add a biblio > > Apply? [(y)es, (n)o, (i)nteractive] y > Applying: Bug 31800: Add REST endpoint to add a biblio > Using index info to reconstruct a base tree... > M api/v1/swagger/swagger.yaml > Falling back to patching base and 3-way merge... > Auto-merging api/v1/swagger/swagger.yaml > CONFLICT (content): Merge conflict in api/v1/swagger/swagger.yaml > error: Failed to merge in the changes. > Patch failed at 0001 Bug 31800: Add REST endpoint to add a biblio I had the same problem before update to 22.12.00.011, after update it applies
Created attachment 148086 [details] [review] Bug 32734: Add REST endpoint to list biblios This patch adds an endpoint to list biblios To test: 1. apply patch 2. enable basic auth 3. call to GET /api/v1/biblios 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/Koha/Biblios.t t/db_dependent/api/v1/biblios.t 6. sign off Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Hammat Wele <hammat.wele@inlibro.com>
Created attachment 148124 [details] [review] Bug 32734: Add REST endpoint to list biblios This patch adds an endpoint to list biblios To test: 1. apply patch 2. enable basic auth 3. call to GET /api/v1/biblios 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/Koha/Biblios.t t/db_dependent/api/v1/biblios.t 6. sign off Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Hammat Wele <hammat.wele@inlibro.com>
Created attachment 148136 [details] [review] Bug 32734: (QA follow-up) Remove stray method On bug 33083 we introduce a better way to implement a reusable method for the same functionality. This patch just removes the one in `Koha::Biblios` and the result should be the same as the one inherited from `Koha::Objects::Record::Collections` will be picked instead. To test: 1. Run: $ prove t/db_dependent/Koha/Biblios.t \ t/db_dependent/api/v1/biblios.t => SUCCESS: Tests pass! 2. Apply this patch 3. Repeat 1 => SUCCESS: Tests pass! Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 148137 [details] [review] Bug 32734: (QA follow-up) Make use of $c->objects->to_api This is using plain `$biblios->to_api` but as of bug 33080, the new helper should be used instead. This patch fixes that. To test: 1. Run: $ ktd --shell k$ prove t/db_dependent/api/v1/biblios.t => SUCCESS: Tests pass! 2. Apply this patch 3. Repeat 1 => SUCCESS: Tests pass! Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Pushed to master for 22.11. Nice work everyone, thanks!
Nice work, thanks everyone! Pushed to 22.11.x for the next release.