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>
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;
{
"/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"