Bug 24908: Add text-formatted MARC support in /biblios/{biblio_id}
authorTomas Cohen Arazi <tomascohen@theke.io>
Thu, 19 Mar 2020 15:04:39 +0000 (12:04 -0300)
committerJoy Nelson <joy@bywatersolutions.com>
Fri, 8 May 2020 22:37:37 +0000 (22:37 +0000)
commitc85ae52c22592587e5bae7f7c5974400a9f07b0d
treec78138e82f5be6142284236c4c08868f146c3145
parent7f99b5a1a0b7ac587dac91ef1c5447c824eadc13
Bug 24908: Add text-formatted MARC support in /biblios/{biblio_id}

This patch makes the route support requesting (through the Accept
header) the MARC record to be output as formatted text as in
$record->as_formatted.

To test:
1. Apply the unit tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/biblios.t
=> FAIL: Tests fail
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Try the route with your favourite API testing tool (Postman?)
=> SUCCESS: Accept: text/plain returns the expected results
=> SUCCESS: Wrong Accept header returns a list of valid formats, and
includes 'text/plain'.
6. Sign off :-D

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Koha/REST/V1/Biblios.pm
api/v1/swagger/paths/biblios.json