[Bug 17926] New: REST api: Boolean values should be coerced
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17926 Bug ID: 17926 Summary: REST api: Boolean values should be coerced Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Web services Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org We need to coerce boolean values so they are converted to JSON boolean values by JSON::Validator instead of just passing the '1' and '0' strings. Steps to reproduce: - Have a patron with 'Lost card' set to 'Yes'. - Open your favourite REST testing tool (HttpRequester on Firefox for example) - Point it to http://localhost:8081/api/v1/patrons/16 (assuming your borrowernumber is 16) => FAIL: You get an error mentioning a Boolean is expected and got a String value. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17926 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|REST api: Boolean values |REST API: Boolean values |should be coerced |should be coerced -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17926 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17926 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |DUPLICATE Status|NEW |RESOLVED --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Adding a TO_JSON method seems a better approach as it won't hide data issues (which could happen if coercing values into booleans). *** This bug has been marked as a duplicate of bug 17932 *** -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org