[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
Mon Nov 7 13:30:25 CET 2022


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

Martin Renvoize <martin.renvoize at ptfs-europe.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #143132|0                           |1
        is obsolete|                            |

--- Comment #108 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
Created attachment 143359
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=143359&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