[Koha-bugs] [Bug 26635] Expand coded values in REST API call
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed Nov 2 23:05:51 CET 2022
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635
--- Comment #78 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
Created attachment 143044
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=143044&action=edit
Bug 26635: Move expand syntax to x-koha-embed
Instead of a global av-expand flag (through a header) this patch
proposes to allow specifying +av_expand at the x-koha-embed header
level. This allows a more fine-grained control on what objects get avs
expanded. e.g.:
GET /patrons/123
x-koha-expand: +av_expand,checkouts.item+av_expand
=>
{
"_str": {
"city": { "str": "Córdoba", ... }
},
...
"checkouts": [
{
...,
"item": {
"_str": {
"not_for_loan_status": { "str": "Reference material", ...
},
...
},
...
}
}
]
}
To test:
1. Run:
$ kshell
k$ prove t/db_dependent/Koha/Object.t \
t/Koha/REST/Plugin/Query.t \
t/db_dependent/Koha/REST/Plugin/Objects.t
=> SUCCESS: Tests pass!
2. Sign off :-D
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list