Koha-clms/Koha/REST/Plugin
Tomas Cohen Arazi 4dff91004e
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>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-01-08 15:12:26 +00:00
..
Objects.pm Bug 24321: Make objects.search use mappings from Koha::Object(s) 2020-01-08 14:42:17 +00:00
Pagination.pm Revert "Bug 22026: Removed 'use Modern::Perl;' from Koha::REST::classes" 2019-02-26 11:04:08 -05:00
PluginRoutes.pm Bug 22835: (follow-up) Remove comented code 2019-06-18 17:34:53 +01:00
Query.pm Bug 24302: Add a way to specify nested objects to embed in OpenAPI 2020-01-08 15:12:26 +00:00