Bug 22440 - ILL API response objects inconsistent with other endpoints
Summary: ILL API response objects inconsistent with other endpoints
Status: In Discussion
Alias: None
Product: Koha
Classification: Unclassified
Component: ILL (show other bugs)
Version: master
Hardware: All All
: P4 normal (vote)
Assignee: Bugs List
QA Contact:
URL: https://wiki.koha-community.org/wiki/...
Keywords:
Depends on:
Blocks: 19774
  Show dependency treegraph
 
Reported: 2019-03-01 10:33 UTC by Andrew Isherwood
Modified: 2019-05-01 10:18 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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