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>
-package Koha::REST::V1::Patrons;
+package Koha::REST::V1::Patron;
# This file is part of Koha.
#
use C4::Auth qw( haspermission );
use Koha::Patrons;
-sub list_patrons {
+sub list {
my ($c, $args, $cb) = @_;
my $user = $c->stash('koha.user');
$c->$cb($patrons->unblessed, 200);
}
-sub get_patron {
+sub get {
my ($c, $args, $cb) = @_;
my $user = $c->stash('koha.user');
"paths": {
"/patrons": {
"get": {
- "x-mojo-controller": "Koha::REST::V1::Patrons",
"operationId": "listPatrons",
"tags": ["patrons"],
"produces": [
},
"/patrons/{borrowernumber}": {
"get": {
- "x-mojo-controller": "Koha::REST::V1::Patrons",
"operationId": "getPatron",
"tags": ["patrons"],
"parameters": [