Lines 23-36
use Test::More tests => 1;
Link Here
|
23 |
use Test::Mojo; |
23 |
use Test::Mojo; |
24 |
|
24 |
|
25 |
use Module::Load::Conditional; |
25 |
use Module::Load::Conditional; |
26 |
use Swagger2; |
26 |
use JSON::Validator::OpenAPI; |
27 |
|
27 |
|
28 |
use C4::Context; |
28 |
use C4::Context; |
29 |
use Koha::Database; |
29 |
use Koha::Database; |
30 |
|
30 |
|
31 |
my $swaggerPath = C4::Context->config('intranetdir') . "/api/v1/swagger"; |
31 |
my $swaggerPath = C4::Context->config('intranetdir') . "/api/v1/swagger"; |
32 |
my $swagger = Swagger2->new( $swaggerPath . "/swagger.json" )->expand; |
32 |
my $swagger = JSON::Validator::OpenAPI->new->load_and_validate_schema( |
33 |
my $api_spec = $swagger->api_spec->data; |
33 |
$swaggerPath . "/swagger.json", |
|
|
34 |
{ |
35 |
allow_invalid_ref => 1 |
36 |
} |
37 |
); |
38 |
my $api_spec = $swagger->schema->data; |
34 |
my $schema = Koha::Database->new->schema; |
39 |
my $schema = Koha::Database->new->schema; |
35 |
|
40 |
|
36 |
# The basic idea of this test: |
41 |
# The basic idea of this test: |
37 |
- |
|
|