Branch Coverage

blib/lib/Yancy/Plugin/Editor.pm
Criterion Covered Total %
branch 85 108 78.7


line true false branch
208 53 0 if ($config->{'backend'} or $config->{'schema'}) { }
213 1 0 &blessed($config->{'backend'}) ? :
1 52 $config->{'backend'} ? :
231 0 53 if ($config->{'api_controller'})
247 4 0 unless ($auth_cb or exists $config->{'require_user'} or defined $config->{'route'})
254 2 93 $auth_cb ? :
260 4 49 if ($config->{'openapi'} and keys %{$$config{'openapi'};}) { }
285 76 257 if (my $view = $schema->{$schema_name}{'x-view'})
288 0 333 if $schema->{$schema_name}{'x-view'}
289 167 166 if (my $list_cols = $schema->{$schema_name}{'x-list-columns'})
291 8 319 if (ref $col eq 'HASH') { }
294 1 7 if (my($col) = grep({not exists $schema->{$schema_name}{'properties'}{$_};} @cols))
300 1 318 unless (exists $schema->{$schema_name}{'properties'}{$col})
342 1 5 if (@includes)
350 1 5 if ($config)
361 0 584 if $pathspec->{'x-schema'}
366 582 640 if ($method eq 'get') { }
426 214 elsif ($method =~ /^(put|post)$/u) { }
370 0 582 unless $schema = $response_spec->{'schema'}
373 0 426 unless $op_spec->{'parameters'}
374 213 213 unless $pathspec->{'parameters'}
376 0 426 if @body_params > 1
377 0 426 unless $schema = $body_params[0]{'schema'}
382 505 717 unless my $this_ref = $schema->{'$ref'} || $schema->{'items'} && $schema->{'items'}{'$ref'} || $schema->{'properties'} && $schema->{'properties'}{'items'} && $schema->{'properties'}{'items'}{'$ref'}
383 0 717 unless $this_ref =~ s[^#/definitions/][]u
384 0 717 if $this_ref and $schema_name and $this_ref ne $schema_name
388 80 504 unless ($schema_name)
390 0 80 unless $schema_name
402 1 583 unless $spec->{'definitions'}{$schema}
412 1221 0 unless $pathspec->{'x-filter'}
413 1221 0 unless $op_spec->{'x-filter'}
415 0 1221 if @filters
417 1221 0 unless $pathspec->{'x-filter-output'}
418 1221 0 unless $op_spec->{'x-filter-output'}
420 0 1221 if @filters_out
431 505 717 unless $pathspec->{'parameters'}
432 505 717 unless $op_spec->{'parameters'}
437 582 640 if ($method eq 'get') { }
213 427 elsif ($method eq 'post') { }
213 214 elsif ($method eq 'put') { }
213 1 elsif ($method eq 'delete') { }
439 291 291 if ($id_field) { }
459 0 213 unless $id_field
465 0 213 unless $id_field
514 0 276 if $json_schema->{'x-ignore'}
516 16 260 ref $id_field eq 'ARRAY' ? :
518 36 0 if (not $props and $json_schema->{'x-view'})
540 483 1297 ref $props{$_}{'type'} eq 'ARRAY' ? :
541 1 1233 $type eq 'array' ? :
95 1234 $type eq 'boolean' ? :
451 1329 $type eq 'number' || $type eq 'integer' ? :
607 16 188 @id_fields > 1 ? :
72 204 $json_schema->{'x-view'} ? :
645 72 204 $json_schema->{'x-view'} ? :