From b14333285aa7862684a7bcca564cf92388d03e77 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Mon, 30 Dec 2024 11:21:44 +0000 Subject: [PATCH] Bug 36627: (QA follow-up): Rename borrowernumber -> patron_id To test: $ prove t/db_dependent/api/v1/erm_counter_logs.t --- Koha/ERM/EUsage/CounterLog.pm | 12 ++++++++++++ api/v1/swagger/definitions/erm_counter_log.yaml | 6 +++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/Koha/ERM/EUsage/CounterLog.pm b/Koha/ERM/EUsage/CounterLog.pm index 4743a028bdc..1dd7c5aa016 100644 --- a/Koha/ERM/EUsage/CounterLog.pm +++ b/Koha/ERM/EUsage/CounterLog.pm @@ -31,6 +31,18 @@ Koha::ERM::EUsage::CounterLog - Koha ErmCounterLog Object class =cut +=head3 to_api_mapping + +This method returns the mapping for representing a Koha::ERM::EUsage::CounterLog +on the API. + +=cut + +sub to_api_mapping { + return { + borrowernumber => 'patron_id', + }; +} =head3 patron diff --git a/api/v1/swagger/definitions/erm_counter_log.yaml b/api/v1/swagger/definitions/erm_counter_log.yaml index 572f78b6e1b..22af4f6c6cb 100644 --- a/api/v1/swagger/definitions/erm_counter_log.yaml +++ b/api/v1/swagger/definitions/erm_counter_log.yaml @@ -10,8 +10,8 @@ properties: type: - integer - "null" - borrowernumber: - description: borrowernumber of the counter log + patron_id: + description: patron_id of the counter log type: - integer - "null" @@ -43,5 +43,5 @@ properties: additionalProperties: false required: - filename - - borrowernumber + - patron_id - counter_files_id \ No newline at end of file -- 2.39.5