Bug 39900: Add translated_contents embed

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 38b19d72cb)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This commit is contained in:
Pedro Amorim 2025-05-14 11:25:59 +00:00 committed by Paul Derscheid
parent 05b2abd841
commit 8bed105c7b
No known key found for this signature in database
GPG Key ID: C25F9FD44CED595B
3 changed files with 28 additions and 0 deletions

View File

@ -189,6 +189,19 @@ sub borrowernumber {
return $self->additional_content->borrowernumber(@params);
}
=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 [
'id', 'additional_content_id', 'title',
'content', 'lang', 'updated_on',
];
}
=head2 Class Methods
=cut

View File

@ -35,6 +35,11 @@ properties:
type:
- string
- "null"
translated_contents:
description: Related additional contents translations
type:
- array
- "null"
required:
- additional_content_id
- category

View File

@ -35,6 +35,16 @@
- $ref: "../swagger.yaml#/parameters/per_page"
- $ref: "../swagger.yaml#/parameters/q_param"
- $ref: "../swagger.yaml#/parameters/q_body"
- name: x-koha-embed
in: header
required: false
description: Embed list sent as a request header
type: array
items:
type: string
enum:
- translated_contents
collectionFormat: csv
produces:
- application/json
responses: