Summary: | Allow to embed biblio on GET /items | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | REST API | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | dcook, fridolin.somers, m.de.rooy, tomascohen |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
23.11.00,23.05.04,22.11.11
|
|
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 30708 | ||
Attachments: |
Bug 34054: Add tests
Bug 34054: Allow to embed biblio on GET /items Bug 34054: Add tests Bug 34054: Allow to embed biblio on GET /items Bug 34054: Add tests Bug 34054: Allow to embed biblio on GET /items |
Description
Jonathan Druart
2023-06-19 07:48:44 UTC
Created attachment 152466 [details] [review] Bug 34054: Add tests Sponsored-by: BULAC - http://www.bulac.fr/ Created attachment 152467 [details] [review] Bug 34054: Allow to embed biblio on GET /items Test plan: Request the /items REST API endpoint and ask for the biblio's info to be embeded into the response passing x-koha-embed curl -u koha:koha --request GET 'http://localhost:8081/api/v1/items' --header "x-koha-embed: biblio" --header "Content-Type: application/json" Sponsored-by: BULAC - http://www.bulac.fr/ Notes from testing: All works as expected, I ran the curl command provided in the test plan and observed that biblio data was indeed embedded in the JSON response. The updated unit test passes, too: $ prove t/db_dependent/api/v1/items.t t/db_dependent/api/v1/items.t .. ok All tests successful. Files=1, Tests=5, 10 wallclock secs ( 0.05 usr 0.02 sys + 9.34 cusr 0.88 csys = 10.29 CPU) Result: PASS Created attachment 153819 [details] [review] Bug 34054: Add tests Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: Andreas Roussos <a.roussos@dataly.gr> Created attachment 153820 [details] [review] Bug 34054: Allow to embed biblio on GET /items Test plan: Request the /items REST API endpoint and ask for the biblio's info to be embeded into the response passing x-koha-embed curl -u koha:koha --request GET 'http://localhost:8081/api/v1/items' --header "x-koha-embed: biblio" --header "Content-Type: application/json" Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: Andreas Roussos <a.roussos@dataly.gr> # Failed test 'SWAGGER3.2.2' # at /usr/share/koha/t/db_dependent/api/v1/items.t line 83. # got: '500' # expected: '200' # Looks like you planned 15 tests but ran 5. # Looks like you failed 1 test of 5 run. (In reply to Marcel de Rooy from comment #6) > # Failed test 'SWAGGER3.2.2' > # at /usr/share/koha/t/db_dependent/api/v1/items.t line 83. > # got: '500' > # expected: '200' > # Looks like you planned 15 tests but ran 5. > # Looks like you failed 1 test of 5 run. This is passing for me :-/ Test failure resolved. Will resume QA later today Created attachment 156078 [details] [review] Bug 34054: Add tests Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: Andreas Roussos <a.roussos@dataly.gr> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Created attachment 156079 [details] [review] Bug 34054: Allow to embed biblio on GET /items Test plan: Request the /items REST API endpoint and ask for the biblio's info to be embeded into the response passing x-koha-embed curl -u koha:koha --request GET 'http://localhost:8081/api/v1/items' --header "x-koha-embed: biblio" --header "Content-Type: application/json" Sponsored-by: BULAC - http://www.bulac.fr/ Signed-off-by: Andreas Roussos <a.roussos@dataly.gr> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Pushed to master for 23.11. Nice work everyone, thanks! Small API enhancement, I choose to backport to 23.05 Pushed to 23.05.x for 23.05.04 Nice work everyone! Pushed to oldstable for 22.11.x |