[Bug 23677] New: Add route to get a bibliographic record
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23677 Bug ID: 23677 Summary: Add route to get a bibliographic record Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: new feature Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23677 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23677 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=17371 CC| |josef.moravec@gmail.com, | |kyle@bywatersolutions.com, | |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23677 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 93172 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=93172&action=edit Bug 23677: OpenAPI spec for GET /biblios/{biblio_id} -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23677 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 93173 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=93173&action=edit Bug 23677: Schema fix -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23677 --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 93174 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=93174&action=edit Bug 23677: Controller method and dependencies tweak -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23677 --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 93175 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=93175&action=edit Bug 23677: Unit tests This patch introduces tests for the GET /biblios/{biblio_id} endpoint. It tries to cover all the use cases. To test: - Apply this patchset - Run: $ kshell k$ prove t/db_dependent/api/v1/biblios.t => SUCCESS: Tests pass! - Use Postman (or your favourite tool) to test the API => SUCCESS: Works as expected! - Sign off :-D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23677 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff --- Comment #5 from Tomás Cohen Arazi <tomascohen@gmail.com> --- I submit this work to gather opinions. I've already thought about extending this with plugins for handling special serialization formats and schemas. This is just the start -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23677 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joonas.kylmala@helsinki.fi Keywords| |dependency Status|Needs Signoff |In Discussion --- Comment #6 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- I think it would be wise to submit support for MARC in JSON format in a separate patch after this is merged. This is because MARC::Record::MiJ needs to be first packaged for Debian and that might take a while. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23677 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Needs Signoff --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Joonas Kylmälä from comment #6)
I think it would be wise to submit support for MARC in JSON format in a separate patch after this is merged. This is because MARC::Record::MiJ needs to be first packaged for Debian and that might take a while.
It is already packaged. https://packages.debian.org/stretch/libmarc-file-mij-perl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23677 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|dependency | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23677 --- Comment #8 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- (In reply to Tomás Cohen Arazi from comment #7)
It is already packaged.
Sorry about that, I just searched for MARC::Record::MiJ and couldn't find it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23677 --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- It might not be pulled by default. As Catmandu is pulled when you install koha-elasticsearch I recall. But this patch adds as a core dependency so next koha-common builds would pull it! Thanks for looking at my patches -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23677 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |arthur.suzuki@biblibre.com --- Comment #10 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- Hi Tomas, Here are the results for the qa-tools, over than that everything (unit test and manual testing) working perfectly thanks! curl http://localhost:8080/api/v1/biblios/4 \ -H 'Accept: application/json'
Gives back expected results :)
testing 4 commit(s) (applied to 98e4b5c '4a Bug 23537: Overdrive won't show co') Processing files before patches |========================>| 4 / 4 (100.00%) Processing files after patches |========================>| 4 / 4 (100.00%) OK C4/Installer/PerlDependencies.pm OK critic OK forbidden patterns OK git manipulation OK pod OK pod coverage OK spelling OK valid FAIL Koha/REST/V1/Biblios.pm FAIL critic # Variables::ProhibitConditionalDeclarations: Got 1 violation(s). OK forbidden patterns OK git manipulation OK pod OK pod coverage OK spelling OK valid OK Koha/Schema/Result/Biblio.pm OK critic OK forbidden patterns OK git manipulation OK pod OK pod coverage OK spelling OK valid OK t/db_dependent/api/v1/biblios.t OK critic OK forbidden patterns OK git manipulation OK pod OK spelling OK valid -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23677 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23677 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #93174|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23677 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #93175|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23677 --- Comment #11 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 93622 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=93622&action=edit Bug 23677: Controller method and dependencies tweak -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23677 --- Comment #12 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 93623 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=93623&action=edit Bug 23677: Unit tests This patch introduces tests for the GET /biblios/{biblio_id} endpoint. It tries to cover all the use cases. To test: - Apply this patchset - Run: $ kshell k$ prove t/db_dependent/api/v1/biblios.t => SUCCESS: Tests pass! - Use Postman (or your favourite tool) to test the API => SUCCESS: Works as expected! - Sign off :-D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23677 --- Comment #13 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Arthur Suzuki from comment #10)
Hi Tomas, Here are the results for the qa-tools, over than that everything (unit test and manual testing) working perfectly thanks!
curl http://localhost:8080/api/v1/biblios/4 \ -H 'Accept: application/json'
Gives back expected results :)
Awesome! Thanks!
FAIL Koha/REST/V1/Biblios.pm FAIL critic # Variables::ProhibitConditionalDeclarations: Got 1 violation(s).
Fixed! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23677 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23677 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #93172|0 |1 is obsolete| | --- Comment #14 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- Created attachment 93679 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=93679&action=edit Bug 23677: OpenAPI spec for GET /biblios/{biblio_id} Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23677 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #93173|0 |1 is obsolete| | --- Comment #15 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- Created attachment 93680 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=93680&action=edit Bug 23677: Schema fix Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23677 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #93622|0 |1 is obsolete| | --- Comment #16 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- Created attachment 93681 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=93681&action=edit Bug 23677: Controller method and dependencies tweak Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23677 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #93623|0 |1 is obsolete| | --- Comment #17 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- Created attachment 93682 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=93682&action=edit Bug 23677: Unit tests This patch introduces tests for the GET /biblios/{biblio_id} endpoint. It tries to cover all the use cases. To test: - Apply this patchset - Run: $ kshell k$ prove t/db_dependent/api/v1/biblios.t => SUCCESS: Tests pass! - Use Postman (or your favourite tool) to test the API => SUCCESS: Works as expected! - Sign off :-D Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23677 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23677 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #93679|0 |1 is obsolete| | Attachment #93680|0 |1 is obsolete| | Attachment #93681|0 |1 is obsolete| | Attachment #93682|0 |1 is obsolete| | --- Comment #18 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 93750 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=93750&action=edit Bug 23677: OpenAPI spec for GET /biblios/{biblio_id} Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23677 --- Comment #19 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 93751 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=93751&action=edit Bug 23677: Schema fix Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23677 --- Comment #20 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 93752 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=93752&action=edit Bug 23677: Controller method and dependencies tweak Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23677 --- Comment #21 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 93753 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=93753&action=edit Bug 23677: Unit tests This patch introduces tests for the GET /biblios/{biblio_id} endpoint. It tries to cover all the use cases. To test: - Apply this patchset - Run: $ kshell k$ prove t/db_dependent/api/v1/biblios.t => SUCCESS: Tests pass! - Use Postman (or your favourite tool) to test the API => SUCCESS: Works as expected! - Sign off :-D Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23677 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |kyle@bywatersolutions.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23677 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |19.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23677 --- Comment #22 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work! Pushed to master for 19.11.00 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23677 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Component|Architecture, internals, |REST api |and plumbing | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23677 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Add route to get a |Add API route to get a |bibliographic record |bibliographic record -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23677 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=21232 CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #23 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I used this new route on bug 21232. I am if it is ok to request the accept in the header (by default it is */*). Should not we default to application/json? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23677 --- Comment #24 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- +1 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23677 --- Comment #25 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Jonathan Druart from comment #23)
I used this new route on bug 21232. I am if it is ok to request the accept in the header (by default it is */*). Should not we default to application/json?
I didn't implement it like that, because I had plans of making HTML the default (i.e. the normal, tt based view). But it's a fair request. I can do it if you file a bug. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23677 --- Comment #26 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- It seems that other routes (all? I did not check) are already defaulting to json. Is it correct? If so it would make sense to continue that way. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23677 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |24238 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24238 [Bug 24238] GET /biblios does not default to accept:application/json -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23677 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |21232 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21232 [Bug 21232] Problems when linking a subscription to a non-existing biblionumber -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23677 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |17371 See Also|https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=17371 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17371 [Bug 17371] Add routes for biblios [OMNIBUS] -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23677 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |24908 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24908 [Bug 24908] Allow fetching text-formatted MARC data -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23677 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |24909 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24909 [Bug 24909] Add public route to get a bibliographic record -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23677 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |24237 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24237 [Bug 24237] The 406 response on the biblios end point should be more discoverable -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org