[Koha-bugs] [Bug 21334] Add bibliographic content type definitions
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu Jan 10 13:11:06 CET 2019
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21334
Justin Jack <adamgrayling at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |adamgrayling at gmail.com
--- Comment #12 from Justin Jack <adamgrayling at gmail.com> ---
(In reply to Josef Moravec from comment #7)
> Created attachment 78600 [details] [review]
> Bug 21334: Add bibliographic content type definitions
>
> This patch adds the following content type definitions, to be used by
> endpoint authors implementing MARC-related endpoints:
>
> --------------------------------------
> | Content-type | Alias |
> |--------------------------|---------|
> | application/marcxml+xml | marcxml |
> | application/marc-in-json | mij |
> | application/marc | marc |
> --------------------------------------
>
> Code using this aliases will use them like this:
> - Suppose you want to output data in MARCXML format:
>
> my $record = cool_method_that_returns_MARC_RECORD();
> return $c->render( status => 200, format => 'marcxml', text =>
> $record->as_xml_record );
>
> Note: 'text' by defaults encodes output as UTF-8. If the encoding is not
> UTF-8 you should encode the data on your own.
>
> To test:
> - Apply this patches
> - Run:
> $ kshell
> k$ prove t/db_dependent/Koha/REST/V1.t
> => SUCCESS: Test pass!
> - Sign off :-D
>
> Signed-off-by: Michal Denar <https://whatstatus.co/guess-ill-die>
>
> Signed-off-by: Josef Moravec <josef.moravec at gmail.com>
After pushing bug 21116 I decided this one warranted backporting for the same
reasons outlined on that bug.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list