[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
Thu Nov 3 16:22:51 CET 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

--- Comment #95 from Kyle M Hall <kyle at bywatersolutions.com> ---
Created attachment 143132
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=143132&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

Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>

Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list