|
Lines 74-88
sub startup {
Link Here
|
| 74 |
push @{$self->routes->namespaces}, 'Koha::Plugin'; |
74 |
push @{$self->routes->namespaces}, 'Koha::Plugin'; |
| 75 |
|
75 |
|
| 76 |
# Try to load and merge all schemas first and validate the result just once. |
76 |
# Try to load and merge all schemas first and validate the result just once. |
| 77 |
my $spec; |
77 |
my $spec = $validator->bundle( |
| 78 |
try { |
|
|
| 79 |
$spec = $validator->bundle( |
| 80 |
{ |
78 |
{ |
| 81 |
replace => 1, |
79 |
replace => 1, |
| 82 |
schema => $self->home->rel_file("api/v1/swagger/swagger.json") |
80 |
schema => $self->home->rel_file("api/v1/swagger/swagger.json") |
| 83 |
} |
81 |
} |
| 84 |
); |
82 |
); |
| 85 |
|
83 |
|
|
|
84 |
try { |
| 86 |
$self->plugin( |
85 |
$self->plugin( |
| 87 |
'Koha::REST::Plugin::PluginRoutes' => { |
86 |
'Koha::REST::Plugin::PluginRoutes' => { |
| 88 |
spec => $spec, |
87 |
spec => $spec, |
| 89 |
- |
|
|