jhthorsen / openapi-client

A client for talking to an Open API powered server
11 stars 17 forks source link

Failed test 'no definitions added' #22

Closed declanmalone closed 4 years ago

declanmalone commented 5 years ago

Latest versions of Mojolicious::Plugin::OpenAPI and OpenAPI::Client fails a test...

Adding a dump of return value being tested (line 20 of t/command-local-with-ref.t):

  # failing test
  ok !$oc->validator->schema->get('/definitions'), 'no definitions added';
  warn "*********************\n";
  my $r = $oc->validator->schema->get('/definitions');
  warn Dumper($r);

Test output

t/command-local-with-ref.t .. 1/? 
#   Failed test 'no definitions added'
#   at t/command-local-with-ref.t line 24.
*********************
$VAR1 = {
          'DefaultResponse' => {
                                 'required' => [
                                                 'errors'
                                               ],
                                 'properties' => {
                                                   'errors' => {
                                                                 'items' => {
                                                                              'type' => 'object',
                                                                              'required' => [
                                                                                              'message'
                                                                                            ],
                                                                              'properties' => {
                                                                                                'path' => {
                                                                                                            'type' => 'string'
                                                                                                          },
                                                                                                'message' => {
                                                                                                               'type' => 'string'
                                                                                                             }
                                                                                              }
                                                                            },
                                                                 'type' => 'array'
                                                               }
                                                 },
                                 'type' => 'object'
                               }
        };