From c8c3a8975a1d1b3f27b834f9fe069e071329a88d Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Thu, 23 Mar 2017 15:52:32 -0300 Subject: [PATCH] Bug 18120: (followup) Make operationId unique This patch renames the method names, and the operationID on the swagger spec so they are unique. Signed-off-by: Tomas Cohen Arazi --- Koha/REST/V1/Acquisitions/Vendors.pm | 10 +++++----- api/v1/swagger/paths/acquisitions_vendors.json | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Koha/REST/V1/Acquisitions/Vendors.pm b/Koha/REST/V1/Acquisitions/Vendors.pm index f91a1d9..44eae92 100644 --- a/Koha/REST/V1/Acquisitions/Vendors.pm +++ b/Koha/REST/V1/Acquisitions/Vendors.pm @@ -24,7 +24,7 @@ use Koha::Acquisition::Booksellers; use Try::Tiny; -sub list { +sub list_vendors { my ( $c, $args, $cb ) = @_; my @vendors; @@ -43,7 +43,7 @@ sub list { }; } -sub get { +sub get_vendor { my ( $c, $args, $cb ) = @_; my $vendor = Koha::Acquisition::Booksellers->find( $args->{vendor_id} ); @@ -54,7 +54,7 @@ sub get { return $c->$cb( _to_api($vendor), 200 ); } -sub add { +sub add_vendor { my ( $c, $args, $cb ) = @_; my $vendor = Koha::Acquisition::Bookseller->new( _to_model( $args->{body} ) ); @@ -73,7 +73,7 @@ sub add { }; } -sub update { +sub update_vendor { my ( $c, $args, $cb ) = @_; my $vendor; @@ -98,7 +98,7 @@ sub update { } -sub delete { +sub delete_vendor { my ( $c, $args, $cb ) = @_; my $vendor; diff --git a/api/v1/swagger/paths/acquisitions_vendors.json b/api/v1/swagger/paths/acquisitions_vendors.json index 3ec8f1f..a67b830 100644 --- a/api/v1/swagger/paths/acquisitions_vendors.json +++ b/api/v1/swagger/paths/acquisitions_vendors.json @@ -2,7 +2,7 @@ "/acquisitions/vendors": { "get": { "x-mojo-controller": "Koha::REST::V1::Acquisitions::Vendors", - "operationId": "list", + "operationId": "listVendors", "tags": ["acquisitions","vendors"], "produces": [ "application/json" @@ -51,7 +51,7 @@ }, "post": { "x-mojo-controller": "Koha::REST::V1::Acquisitions::Vendors", - "operationId": "add", + "operationId": "addVendor", "tags": ["acquisitions","vendors"], "parameters": [{ "name": "body", @@ -95,7 +95,7 @@ "/acquisitions/vendors/{vendor_id}": { "get": { "x-mojo-controller": "Koha::REST::V1::Acquisitions::Vendors", - "operationId": "get", + "operationId": "getVendor", "tags": ["acquisitions","vendors"], "parameters": [{ "$ref": "../parameters.json#/vendoridPathParam" @@ -137,7 +137,7 @@ }, "put": { "x-mojo-controller": "Koha::REST::V1::Acquisitions::Vendors", - "operationId": "update", + "operationId": "updateVendor", "tags": ["acquisitions","vendors"], "parameters": [{ "$ref": "../parameters.json#/vendoridPathParam" @@ -187,7 +187,7 @@ }, "delete": { "x-mojo-controller": "Koha::REST::V1::Acquisitions::Vendors", - "operationId": "delete", + "operationId": "deleteVendor", "tags": ["acquisitions","vendors"], "parameters": [{ "$ref": "../parameters.json#/vendoridPathParam" -- 2.7.4