[Bug 24302] New: Add a way to specify nested objects to embed in OpenAPI
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24302 Bug ID: 24302 Summary: Add a way to specify nested objects to embed in OpenAPI Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: new feature Priority: P5 - low Component: REST API Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com An extension needs to be added, and a helper for handling the code so a request can include (in a header) information about objects that need to be embedded. The request header needs to be validated against the spec and return accordingly. -- 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=24302 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |24228 Assignee|koha-bugs@lists.koha-commun |agustinmoyano@theke.io |ity.org | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24228 [Bug 24228] Add a parameter to recursively embed objects in Koha::Object(s)->to_api -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24302 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 96619 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96619&action=edit Bug 24302: Add a way to specify nested objects to embed in OpenAPI This patch introduces a helper for handling x-koha-embed headers on API requests. It reads the embed definitions and adds them to the stash for later use (either manually on the controllers, or in the objects.search helper. Submitting early for community scrutiny. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24302 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24302 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24302 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #96619|0 |1 is obsolete| | --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 96624 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96624&action=edit Bug 24302: Add a way to specify nested objects to embed in OpenAPI This patch introduces a helper for handling x-koha-embed headers on API requests. It reads the embed definitions and adds them to the stash for later use (either manually on the controllers, or in the objects.search helper. x-koha-embed needs to be defined as a list on the OpenAPI spec. It throws an exception when invalid combinations are found. To test: 1. Apply this patch 2. Run: $ kshell k$ prove t/Koha/REST/Plugin/Query.t => SUCCESS: Tests pass! 3.Sign off :-D TODO: Add tests for the authenticate_api_request change on the API itself. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24302 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org, | |josef.moravec@gmail.com, | |kyle@bywatersolutions.com, | |martin.renvoize@ptfs-europe | |.com, | |nick@bywatersolutions.com Assignee|agustinmoyano@theke.io |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=24302 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |18731 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18731 [Bug 18731] Add routes for acquisition orders -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24302 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24302 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #96624|0 |1 is obsolete| | --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 96639 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96639&action=edit Bug 24302: Add a way to specify nested objects to embed in OpenAPI This patch introduces a helper for handling x-koha-embed headers on API requests. It reads the embed definitions and adds them to the stash for later use (either manually on the controllers, or in the objects.search helper. x-koha-embed needs to be defined as a list on the OpenAPI spec. It throws an exception when invalid combinations are found. To test: 1. Apply this patch 2. Run: $ kshell k$ prove t/Koha/REST/Plugin/Query.t => SUCCESS: Tests pass! 3.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=24302 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #96639|0 |1 is obsolete| | --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 96640 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96640&action=edit Bug 24302: Add a way to specify nested objects to embed in OpenAPI This patch introduces a helper for handling x-koha-embed headers on API requests. It reads the embed definitions and adds them to the stash for later use (either manually on the controllers, or in the objects.search helper. x-koha-embed needs to be defined as a list on the OpenAPI spec. It throws an exception when invalid combinations are found. To test: 1. Apply this patch 2. Run: $ kshell k$ prove t/Koha/REST/Plugin/Query.t => SUCCESS: Tests pass! 3.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=24302 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |agustinmoyano@theke.io, | |oleonard@myacpl.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24302 Agustín Moyano <agustinmoyano@theke.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |20936 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20936 [Bug 20936] Holds History for patrons in OPAC -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24302 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=24302 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #96640|0 |1 is obsolete| | --- Comment #5 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Comment on attachment 96640 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96640 Bug 24302: Add a way to specify nested objects to embed in OpenAPI Rebased -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24302 --- Comment #6 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 96756 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96756&action=edit Bug 24302: Add a way to specify nested objects to embed in OpenAPI This patch introduces a helper for handling x-koha-embed headers on API requests. It reads the embed definitions and adds them to the stash for later use (either manually on the controllers, or in the objects.search helper. x-koha-embed needs to be defined as a list on the OpenAPI spec. It throws an exception when invalid combinations are found. To test: 1. Apply this patch 2. Run: $ kshell k$ prove t/Koha/REST/Plugin/Query.t => SUCCESS: Tests pass! 3.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=24302 Kyle M Hall <kyle@bywatersolutions.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=24302 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #96756|0 |1 is obsolete| | --- Comment #7 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 96956 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96956&action=edit Bug 24302: Add a way to specify nested objects to embed in OpenAPI This patch introduces a helper for handling x-koha-embed headers on API requests. It reads the embed definitions and adds them to the stash for later use (either manually on the controllers, or in the objects.search helper. x-koha-embed needs to be defined as a list on the OpenAPI spec. It throws an exception when invalid combinations are found. To test: 1. Apply this patch 2. Run: $ kshell k$ prove t/Koha/REST/Plugin/Query.t => SUCCESS: Tests pass! 3.Sign off :-D 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=24302 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #96956|0 |1 is obsolete| | --- Comment #8 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 96957 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96957&action=edit Bug 24302: Add a way to specify nested objects to embed in OpenAPI This patch introduces a helper for handling x-koha-embed headers on API requests. It reads the embed definitions and adds them to the stash for later use (either manually on the controllers, or in the objects.search helper. x-koha-embed needs to be defined as a list on the OpenAPI spec. It throws an exception when invalid combinations are found. To test: 1. Apply this patch 2. Run: $ kshell k$ prove t/Koha/REST/Plugin/Query.t => SUCCESS: Tests pass! 3.Sign off :-D 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=24302 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |release-notes-needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24302 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #9 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- As per bug 24228, Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24302 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |20.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24302 --- Comment #10 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work everyone! Pushed to master for 20.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24302 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This development introduces release notes| |a way to define embeddable | |objects on API routes. On | |the path specs, they will | |be specified using dot | |notation for nested | |embeddings: | | | |"x-koha-embed": [ | | | |'biblio', | | | |'biblio.items', | | 'fund' | |] | | | |The consumer will need | |to add a header to the | |request, specifying the | |things they want to embed | |using comma-separated | |values like this: | | | |x-koha-embed: 'biblio,fund' | | | |This header will be | |validated against the | |endpoint spec and an error | |code will be returned if | |the request is not | |appropriate. QA Contact| |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=24302 Joy Nelson <joy@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joy@bywatersolutions.com --- Comment #11 from Joy Nelson <joy@bywatersolutions.com> --- Does not apply to 19.11.x. Tomas if you need this in 19.11.x I'll need help getting to it to apply. Thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24302 Joy Nelson <joy@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED --- Comment #12 from Joy Nelson <joy@bywatersolutions.com> --- New feature not pushed to 19.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24302 Ere Maijala <ere.maijala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ere.maijala@helsinki.fi -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24302 Agustín Moyano <agustinmoyano@theke.io> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|20936 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20936 [Bug 20936] Holds History for patrons in OPAC -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24302 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|release-notes-needed | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org