https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38291 --- Comment #70 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 211211 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211211&action=edit Bug 38291: (QA follow-up) Map attributes to API naming conventions The endpoint returned the raw database column names. Add Koha::Library::Group->to_api_mapping and rename the attributes in the swagger definition and query parameters to follow the API naming conventions: id => library_group_id branchcode => library_id ft_hide_patron_info => hide_patron_info ft_limit_item_editing => limit_item_editing ft_search_groups_opac => is_opac_search_group ft_search_groups_staff => is_staff_search_group ft_local_hold_group => is_local_hold_group ft_local_float_group => is_local_float_group The descriptions of the attributes now explain what each one does, instead of repeating the column name. parent_id keeps its name, as it identifies the parent library group. To test: 1. Apply the patches, then run yarn api:bundle and restart_all 2. Administration > Library groups: create a group "Searchable" with "Use for OPAC search groups" checked and add a library to it 3. Log in to the staff interface as a superlibrarian and visit /api/v1/library_groups => SUCCESS: the entries use library_group_id, library_id, hide_patron_info, limit_item_editing, is_opac_search_group, is_staff_search_group, is_local_hold_group and is_local_float_group => SUCCESS: "Searchable" has is_opac_search_group true 4. Visit /api/v1/library_groups?is_opac_search_group=1 => SUCCESS: only the groups used for OPAC search are listed 5. Visit /api/v1/library_groups?library_id=<branchcode of the library you added> => SUCCESS: only the entry for that library in the group is listed 6. Run: prove t/db_dependent/api/v1/library_groups.t xt/api.t => SUCCESS: Tests pass Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.