|
Lines 49-56
sub register {
Link Here
|
| 49 |
|
49 |
|
| 50 |
if ( C4::Context->config("enable_plugins") ) |
50 |
if ( C4::Context->config("enable_plugins") ) |
| 51 |
{ |
51 |
{ |
| 52 |
$self->{'swagger-v2-schema'} = $app->home->rel_file("api/swagger-v2-schema.json"); |
|
|
| 53 |
|
| 54 |
# plugin needs to define a namespace |
52 |
# plugin needs to define a namespace |
| 55 |
@plugins = Koha::Plugins->new()->GetPlugins( |
53 |
@plugins = Koha::Plugins->new()->GetPlugins( |
| 56 |
{ |
54 |
{ |
|
Lines 79-85
sub inject_routes {
Link Here
|
| 79 |
return try { |
77 |
return try { |
| 80 |
|
78 |
|
| 81 |
my $backup_spec = merge_spec( clone($spec), $plugin ); |
79 |
my $backup_spec = merge_spec( clone($spec), $plugin ); |
| 82 |
if ( $self->spec_ok( $backup_spec, $validate ) ) { |
80 |
if ( $self->spec_ok( $backup_spec ) ) { |
| 83 |
$spec = merge_spec( $spec, $plugin ); |
81 |
$spec = merge_spec( $spec, $plugin ); |
| 84 |
} |
82 |
} |
| 85 |
else { |
83 |
else { |
| 86 |
- |
|
|