@@ -, +, @@ --- Koha/Cash/Register/Cashup.pm | 6 ++++++ Koha/REST/V1/CashRegisters/Cashups.pm | 6 +++++- api/v1/swagger/definitions/cashup.json | 4 ++++ api/v1/swagger/paths/cash_registers.json | 5 ++++- 4 files changed, 19 insertions(+), 2 deletions(-) --- a/Koha/Cash/Register/Cashup.pm +++ a/Koha/Cash/Register/Cashup.pm @@ -164,3 +164,9 @@ sub to_api_mapping { } 1; + +=head1 AUTHORS + +Martin Renvoize + +=cut --- a/Koha/REST/V1/CashRegisters/Cashups.pm +++ a/Koha/REST/V1/CashRegisters/Cashups.pm @@ -65,7 +65,11 @@ sub get { openapi => { error => "Cashup not found" } ); } - return $c->render( status => 200, openapi => $cashup->to_api ); + my $embed = $c->stash('koha.embed'); + return $c->render( + status => 200, + openapi => $cashup->to_api( { embed => $embed } ) + ); } catch { $c->unhandled_exception($_); --- a/api/v1/swagger/definitions/cashup.json +++ a/api/v1/swagger/definitions/cashup.json @@ -21,6 +21,10 @@ "type": "string", "format": "date-time", "description": "Timestamp for the latest line update" + }, + "summary": { + "type": "object", + "description": "A summary of the cashup action" } } } --- a/api/v1/swagger/paths/cash_registers.json +++ a/api/v1/swagger/paths/cash_registers.json @@ -95,7 +95,10 @@ "permissions": { "cash_management": "cashup" } - } + }, + "x-koha-embed": [ + "summary" + ] } } } --