Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -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

Expand Down
1 change: 0 additions & 1 deletion Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
Expand Down
6 changes: 2 additions & 4 deletions lib/GraphQL/Plugin/Convert/OpenAPI.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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;
Expand Down