From d7c82d7ba069cb090c494bdfd8b59e8e8433f4bf Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Wed, 27 Mar 2019 14:23:18 -0300 Subject: [PATCH] Bug 13895: (QA follow-up) Make the class plural Signed-off-by: Tomas Cohen Arazi --- Koha/REST/V1/{Checkout.pm => Checkouts.pm} | 10 +++++----- api/v1/swagger/paths/checkouts.json | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) rename Koha/REST/V1/{Checkout.pm => Checkouts.pm} (92%) diff --git a/Koha/REST/V1/Checkout.pm b/Koha/REST/V1/Checkouts.pm similarity index 92% rename from Koha/REST/V1/Checkout.pm rename to Koha/REST/V1/Checkouts.pm index e228216a96..6c1c5e3985 100644 --- a/Koha/REST/V1/Checkout.pm +++ b/Koha/REST/V1/Checkouts.pm @@ -1,4 +1,4 @@ -package Koha::REST::V1::Checkout; +package Koha::REST::V1::Checkouts; # This file is part of Koha. # @@ -135,8 +135,8 @@ attribute names. sub _to_api { my $checkout = shift; - foreach my $column ( keys %{ $Koha::REST::V1::Checkout::to_api_mapping } ) { - my $mapped_column = $Koha::REST::V1::Checkout::to_api_mapping->{$column}; + foreach my $column ( keys %{ $Koha::REST::V1::Checkouts::to_api_mapping } ) { + my $mapped_column = $Koha::REST::V1::Checkouts::to_api_mapping->{$column}; if ( exists $checkout->{ $column } && defined $mapped_column ) { $checkout->{ $mapped_column } = delete $checkout->{ $column }; @@ -158,8 +158,8 @@ attribute names. sub _to_model { my $checkout = shift; - foreach my $attribute ( keys %{ $Koha::REST::V1::Checkout::to_model_mapping } ) { - my $mapped_attribute = $Koha::REST::V1::Checkout::to_model_mapping->{$attribute}; + foreach my $attribute ( keys %{ $Koha::REST::V1::Checkouts::to_model_mapping } ) { + my $mapped_attribute = $Koha::REST::V1::Checkouts::to_model_mapping->{$attribute}; if ( exists $checkout->{ $attribute } && defined $mapped_attribute ) { $checkout->{ $mapped_attribute } = delete $checkout->{ $attribute }; diff --git a/api/v1/swagger/paths/checkouts.json b/api/v1/swagger/paths/checkouts.json index 1729826a4f..6293401b8b 100644 --- a/api/v1/swagger/paths/checkouts.json +++ b/api/v1/swagger/paths/checkouts.json @@ -1,7 +1,7 @@ { "/checkouts": { "get": { - "x-mojo-to": "Checkout#list", + "x-mojo-to": "Checkouts#list", "operationId": "listCheckouts", "tags": ["patrons", "checkouts"], "parameters": [{ @@ -35,7 +35,7 @@ }, "/checkouts/{checkout_id}": { "get": { - "x-mojo-to": "Checkout#get", + "x-mojo-to": "Checkouts#get", "operationId": "getCheckout", "tags": ["patrons", "checkouts"], "parameters": [{ @@ -65,7 +65,7 @@ }, "/checkouts/{checkout_id}/renewal": { "post": { - "x-mojo-to": "Checkout#renew", + "x-mojo-to": "Checkouts#renew", "operationId": "renewCheckout", "tags": ["patrons", "checkouts"], "parameters": [{ -- 2.21.0