@@ -, +, @@ --- Koha/Biblio.pm | 13 +++ api/v1/swagger/paths.json | 3 + api/v1/swagger/paths/items.yaml | 51 +++++++++++ .../bootstrap/en/modules/opac-detail.tt | 91 ++++++++++++++++++- opac/opac-detail.pl | 11 +++ 5 files changed, 167 insertions(+), 2 deletions(-) --- a/Koha/Biblio.pm +++ a/Koha/Biblio.pm @@ -966,6 +966,19 @@ sub get_marc_notes { return \@marcnotes; } +=head3 public_read_list + +This method returns the list of publicly readable database fields for both API and UI output purposes + +=cut + +sub public_read_list { + return [ + 'biblionumber', 'frameworkcode', 'title', 'unititle', + 'seriestitle', 'copyrightdate', 'datecreated' + ]; +} + =head3 to_api my $json = $biblio->to_api; --- a/api/v1/swagger/paths.json +++ a/api/v1/swagger/paths.json @@ -179,6 +179,9 @@ "/public/biblios/{biblio_id}/items": { "$ref": "paths/biblios.json#/~1public~1biblios~1{biblio_id}~1items" }, + "/public/items/{item_id}/bundled_items": { + "$ref": "paths/items.yaml#/~1public~1items~1{item_id}~1bundled_items" + }, "/public/libraries": { "$ref": "paths/libraries.json#/~1public~1libraries" }, --- a/api/v1/swagger/paths/items.yaml +++ a/api/v1/swagger/paths/items.yaml @@ -303,3 +303,54 @@ x-koha-authorization: permissions: reserveforothers: place_holds +/public/items/{item_id}/bundled_items: + get: + x-mojo-to: Items#bundled_items + operationId: bundledItemsPublic + tags: + - items + summary: List bundled items + parameters: + - $ref: ../parameters.json#/item_id_pp + - name: external_id + in: query + description: Search on the item's barcode + required: false + type: string + - $ref: ../parameters.json#/match + - $ref: ../parameters.json#/order_by + - $ref: ../parameters.json#/page + - $ref: ../parameters.json#/per_page + - $ref: ../parameters.json#/q_param + - $ref: ../parameters.json#/q_body + - $ref: ../parameters.json#/q_header + consumes: + - application/json + produces: + - application/json + responses: + "200": + description: A list of item + schema: + type: array + items: + $ref: ../definitions.json#/item + "401": + description: Authentication required + schema: + $ref: ../definitions.json#/error + "403": + description: Access forbidden + schema: + $ref: ../definitions.json#/error + "500": + description: Internal server error + schema: + $ref: ../definitions.json#/error + "503": + description: Under maintenance + schema: + $ref: ../definitions.json#/error + x-koha-embed: + - biblio + - checkout --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -1122,7 +1122,9 @@