[Koha-bugs] [Bug 16825] Add API route for getting an item
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu Jun 27 15:31:52 CEST 2019
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16825
Tomás Cohen Arazi <tomascohen at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
QA Contact| |tomascohen at gmail.com
Status|Needs Signoff |Failed QA
--- Comment #39 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
Hi, Johanna.
This work has been initiated before a few agreements were reached about how to
write endpoints for the API. I've got a few remarks on this regard:
- There's a problem with the attribute mappings. There's an RFC for this
endpoint's spec [1]. The attribute mappings should respect the RFC (I'm not
sure its been voted, but you should follow it, given the people involved on
writing and discussing it).
- We don't mix privileged users/non-privileged users use cases on the same
endpoint anymore. An endpoint that requires admin privileges belongs to /items.
An endpoint that doesn't require admin privileges goes to /public/items. This
comment related to the check for OpacHiddenItems and the patron status. Non
privileged users should get a 403 on this endpoint. If you need general
unprivileged access, then add an endpoint to /public/items/{item_id}
- Don't add to x-primitives, that went too far in my opinion. Just put the
definition in the path spec.
- For the tests, take t/db_dependent/api/v1/libraries.t as an example. I like
it that you added stub tests for unimplemented routes, but try to clean it up
by setting Basic authentication as libraries.t
I can help on any doubts you might have or even coding. Just ping me (tcohen on
IRC)
[1] https://wiki.koha-community.org/wiki/Items_endpoint_RFC
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list