[Koha-bugs] [Bug 33503] Plugin OpenAPI2.0 specification schema fragments are not resolved. Merge full schema definitions.

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Apr 18 12:13:58 CEST 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33503

--- Comment #3 from Olli-Antti Kivilahti <olli-antti.kivilahti at hypernova.fi> ---
>From the plugin, one can implement this hook with this code fragment:

sub api_spec {
    my ( $plugin, $args ) = @_;
    return JSON::Validator::Schema::OpenAPIv2->new;

    my $schema2 = JSON::Validator::Schema::OpenAPIv2->new;
    $schema2->resolve($plugin->mbf_dir() . "/openapi.yaml");
    return $schema2->bundle->data; #Bundle merges the external/internal/local
references in the plugin schema path.
}

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list