Browse Source

Bug 15126: x-mojo-controller deprecation

Remove the use of soon to be deprecated x-mojo-controller from our
specification and replace with the recommended operationId format.

Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
16.05.x
Martin Renvoize 7 years ago
committed by Kyle M Hall
parent
commit
d59b4596d5
  1. 6
      Koha/REST/V1/Patron.pm
  2. 2
      api/v1/swagger.json

6
Koha/REST/V1/Patrons.pm → Koha/REST/V1/Patron.pm

@ -1,4 +1,4 @@
package Koha::REST::V1::Patrons;
package Koha::REST::V1::Patron;
# This file is part of Koha.
#
@ -22,7 +22,7 @@ use Mojo::Base 'Mojolicious::Controller';
use C4::Auth qw( haspermission );
use Koha::Patrons;
sub list_patrons {
sub list {
my ($c, $args, $cb) = @_;
my $user = $c->stash('koha.user');
@ -35,7 +35,7 @@ sub list_patrons {
$c->$cb($patrons->unblessed, 200);
}
sub get_patron {
sub get {
my ($c, $args, $cb) = @_;
my $user = $c->stash('koha.user');

2
api/v1/swagger.json

@ -16,7 +16,6 @@
"paths": {
"/patrons": {
"get": {
"x-mojo-controller": "Koha::REST::V1::Patrons",
"operationId": "listPatrons",
"tags": ["patrons"],
"produces": [
@ -43,7 +42,6 @@
},
"/patrons/{borrowernumber}": {
"get": {
"x-mojo-controller": "Koha::REST::V1::Patrons",
"operationId": "getPatron",
"tags": ["patrons"],
"parameters": [

Loading…
Cancel
Save