Bug 17927 introduced data type fixes on the /patrons endpoint (integer
and boolean types got fixed). This led to the /patrons endpoint not to
work because the underlying code didn't provide the right data.
With the introduction of TO_JSON on Koha::Object(s) we now have a way to
output the proper data types.
This patch does so by:
- Adding is_boolean => 1 to the relevant columns on the Borrower.pm
schema file.
- Tweaking the controller class for the /patrons endpoint so it doesn't
use the $object(s)->unblessed call but just let the Mojo::JSON library
pick out TO_JSON implementation instead on rendering the output.
- It adds a new test for booleans.
[1] It is self explanatory to just try the API using any of the
available tools (I use HttpRequester on Firefox)
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>