Skip to content

Commit 2882b3f

Browse files
Clive Hollowaymohawk2
authored andcommitted
Remove dependency on dead JSON::Validator::OpenAPI::Mojolicious
1 parent db71c1a commit 2882b3f

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

Changes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
- switch from JSON::Validator::OpenAPI::Mojolicious to JSON::Validator - thanks @cliveholloway
2+
13
0.21 2021-09-09
24
- update README to avoid build failures
35

Makefile.PL

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ WriteMakefile(
2222
},
2323
PREREQ_PM => {
2424
'JSON::Validator' => '2.01', # fqn bundle fix
25-
'JSON::Validator::OpenAPI::Mojolicious' => '0',
2625
'GraphQL' => '0.32', # new comment format
2726
'OpenAPI::Client' => '0.17', # "call_p" interface
2827
},

lib/GraphQL/Plugin/Convert/OpenAPI.pm

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use warnings;
55
use GraphQL::Schema;
66
use GraphQL::Plugin::Type::DateTime;
77
use GraphQL::Debug qw(_debug);
8-
use JSON::Validator::OpenAPI::Mojolicious;
8+
use JSON::Validator;
99
use OpenAPI::Client;
1010

1111
our $VERSION = "0.21";
@@ -497,9 +497,7 @@ sub _walk_type {
497497
sub to_graphql {
498498
my ($class, $spec, $app) = @_;
499499
my %appargs = (app => $app) if $app;
500-
my $openapi_schema = JSON::Validator::OpenAPI::Mojolicious->new(
501-
%appargs
502-
)->schema($spec)->schema;
500+
my $openapi_schema = JSON::Validator->new->schema($spec)->schema;
503501
DEBUG and _debug('OpenAPI.schema', $openapi_schema);
504502
my $defs = $openapi_schema->get("/definitions");
505503
my @ast;

0 commit comments

Comments
 (0)