From 2882b3f9dcc95ab342280308c8b394aff371a49f Mon Sep 17 00:00:00 2001 From: Clive Holloway Date: Wed, 22 Sep 2021 15:18:35 -0400 Subject: [PATCH] Remove dependency on dead JSON::Validator::OpenAPI::Mojolicious --- Changes | 2 ++ Makefile.PL | 1 - lib/GraphQL/Plugin/Convert/OpenAPI.pm | 6 ++---- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Changes b/Changes index f9b3f73..816233e 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,5 @@ +- switch from JSON::Validator::OpenAPI::Mojolicious to JSON::Validator - thanks @cliveholloway + 0.21 2021-09-09 - update README to avoid build failures diff --git a/Makefile.PL b/Makefile.PL index 4e17923..f0442df 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -22,7 +22,6 @@ WriteMakefile( }, PREREQ_PM => { 'JSON::Validator' => '2.01', # fqn bundle fix - 'JSON::Validator::OpenAPI::Mojolicious' => '0', 'GraphQL' => '0.32', # new comment format 'OpenAPI::Client' => '0.17', # "call_p" interface }, diff --git a/lib/GraphQL/Plugin/Convert/OpenAPI.pm b/lib/GraphQL/Plugin/Convert/OpenAPI.pm index b3c902a..89a0722 100644 --- a/lib/GraphQL/Plugin/Convert/OpenAPI.pm +++ b/lib/GraphQL/Plugin/Convert/OpenAPI.pm @@ -5,7 +5,7 @@ use warnings; use GraphQL::Schema; use GraphQL::Plugin::Type::DateTime; use GraphQL::Debug qw(_debug); -use JSON::Validator::OpenAPI::Mojolicious; +use JSON::Validator; use OpenAPI::Client; our $VERSION = "0.21"; @@ -497,9 +497,7 @@ sub _walk_type { sub to_graphql { my ($class, $spec, $app) = @_; my %appargs = (app => $app) if $app; - my $openapi_schema = JSON::Validator::OpenAPI::Mojolicious->new( - %appargs - )->schema($spec)->schema; + my $openapi_schema = JSON::Validator->new->schema($spec)->schema; DEBUG and _debug('OpenAPI.schema', $openapi_schema); my $defs = $openapi_schema->get("/definitions"); my @ast;