Browse Source

Bug 18936: (follow-up) Update REST definition for /.../kinds

Signed-off-by: Minna Kivinen <minna.kivinen@hamk.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
20.05.x
Jesse Weaver 5 years ago
committed by Martin Renvoize
parent
commit
18570614c4
Signed by: martin.renvoize GPG Key ID: 422B469130441A0F
  1. 7
      Koha/REST/V1/CirculationRules.pm
  2. 4
      api/v1/swagger/paths/circulation-rules.json

7
Koha/REST/V1/CirculationRules.pm

@ -24,9 +24,12 @@ use Koha::CirculationRules;
use Try::Tiny;
sub get_kinds {
my ( $c, $args, $cb ) = @_;
my $c = shift->openapi->valid_input or return;
return $c->$cb( Koha::CirculationRules->rule_kinds, 200 );
return $c->render(
status => 200,
openapi => Koha::CirculationRules->rule_kinds,
);
}
1;

4
api/v1/swagger/paths/circulation-rules.json

@ -1,8 +1,8 @@
{
"/circulation-rules/kinds": {
"get": {
"x-mojo-controller": "Koha::REST::V1::CirculationRules",
"operationId": "get_kinds",
"x-mojo-to": "CirculationRules#get_kinds",
"operationId": "getCirculationRuleKinds",
"tags": ["cities"],
"produces": [
"application/json"

Loading…
Cancel
Save