[Koha-devel] Mini roadmap for the API

Tomas Cohen Arazi tomascohen at gmail.com
Mon Oct 7 21:32:04 CEST 2019


Hi, with the HAL introduction in mind I plan to (at least) provide a sample
implementation of the following:

- Add a 'to_api' method to Koha::Object and Koha::Objects that can be
overloaded if needed (trivial, WIP 23770)
- Pick a sample endpoint (probably /cities) and make sure the
implementation keeps the current behaviour (trivial, besides the boring
tests)
- Move the existing controllers into using this (trivial)
- Implement in some sample class, to be determined, ->to_api_hal. And make
the endpoint that uses it, Accept: application/hal+json and return this new
data structure. So if JSON is requested, the current behaviour is kept.
Otherwise, the HAL representation will be returned.

Things to think about and which we will be able to play with:
- How to determine the depth of the embedding? (HAL has that ability)
- Should we specify which FK to follow and embed on the query? how would
that query look like?

Thanks for your time :-D

-- 
Tomás Cohen Arazi
Theke Solutions (http://theke.io)
✆ +54 9351 3513384
GPG: B2F3C15F
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20191007/20edbde8/attachment.html>


More information about the Koha-devel mailing list