@@ -, +, @@ - The optional 'extended_attribute' attribute to the patron object OpenAPI definition. It consists of an array of extended_attribute objects. - Add the x-koha-embed: [ 'extended_attributes' ] definition on the GET routes for patrons, allowing immedite availability of the 'extended_attributes' embedding feature. attributes ('Patron attributes' on the UI). e.g.: if your user/pass is koha/koha curl --location --request GET 'http://kohadev-intra.myDNSname.org:8081/api/v1/patrons/1' \ --header 'Content-Type: application/json' \ --header 'Authorization: Basic a29oYTprb2hh' curl --location --request GET 'http://kohadev-intra.myDNSname.org:8081/api/v1/patrons/1' \ --header 'Content-Type: application/json' \ --header 'x-koha-embed: extended_attributes' \ --header 'Authorization: Basic a29oYTprb2hh' --- api/v1/swagger/definitions/patron.json | 7 +++++++ api/v1/swagger/paths/patrons.json | 10 ++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) --- a/api/v1/swagger/definitions/patron.json +++ a/api/v1/swagger/definitions/patron.json @@ -281,6 +281,13 @@ "type": "boolean", "readOnly": true, "description": "If the patron has been anonymized" + }, + "extended_attributes": { + "type": "array", + "description": "patron's extended attributes", + "items": { + "$ref": "extended_attribute.json" + } } }, "additionalProperties": false, --- a/api/v1/swagger/paths/patrons.json +++ a/api/v1/swagger/paths/patrons.json @@ -451,7 +451,10 @@ "permissions": { "borrowers": "1" } - } + }, + "x-koha-embed": [ + "extended_attributes" + ] }, "post": { "x-mojo-to": "Patrons#add", @@ -580,7 +583,10 @@ "permissions": { "borrowers": "edit_borrowers" } - } + }, + "x-koha-embed": [ + "extended_attributes" + ] }, "put": { "x-mojo-to": "Patrons#update", --