Bug 22440

Summary: ILL API response objects inconsistent with other endpoints
Product: Koha Reporter: Andrew Isherwood <andrew.isherwood>
Component: ILLAssignee: Tomás Cohen Arazi <tomascohen>
Status: In Discussion --- QA Contact:
Severity: normal    
Priority: P4 CC: josef.moravec, tomascohen
Version: master   
Hardware: All   
OS: All   
URL: https://wiki.koha-community.org/wiki/Illrequests_endpoint_RFC
Change sponsored?: --- Patch complexity: ---
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 29032    
Bug Blocks: 19774    

Description Andrew Isherwood 2019-03-01 10:33:09 UTC
The response object returned from the /api/vi/illrequest GET route isn't consistent with response objects supplied by other routes, such as the patrons route.

We have an RFC for this route here: https://wiki.koha-community.org/wiki/Illrequests_endpoint_RFC

Josef has made some initial recommendations on what the properties should be named to make them consistent with other routes. We could do with expanding this RFC to make it complete, including a spec on how object embedding should be done since, to date, this is the only route that does this.
Comment 1 Andrew Isherwood 2019-03-11 09:13:16 UTC
Further suggestions from Josef to bring this endpoint into line. We should follow the convention illustrated here: https://github.com/Koha-Community/Koha/blob/master/Koha/REST/V1/Library.pm#L46

This automagically looks at the parameters passed in the request and, if they match parameters described in the OpenAPI spec and, if they match, uses their values as filters. The _to_api & _to_model methods will allow us to carry out the property name consistency described in the bug description