Branch Coverage

blib/lib/SQL/Translator/Parser/OpenAPI.pm
Criterion Covered Total %
branch 104 114 91.2


line true false branch
49 33 45 @props == 1 ? :
50 7 71 if $real and $real->{'type'} eq 'array'
51 33 45 if $real
52 24 54 if $real
53 7 26 $is_array ? :
33 45 @props == 1 ? :
69 2 6 if grep $reffed->{$_}, @{$sig2names{$sig};}
114 17 61 if $reffed->{$defname}
118 1091 102 unless ($thismask & $supermask) == $thismask
133 169 5 unless $prop->{'enum'}
5 169 if (@{[] unless $prop->{'enum'};})
143 42 81 ref $field_in eq 'ARRAY' ? :
153 4 38 ref $field_in eq 'ARRAY' ? :
155 38 4 if @fields == 1 and $fields[0]->data_type =~ /int/
167 11 62 unless $args->{'snake_case'}
173 0 140 unless $ref =~ s[^#/definitions/][]
188 4 26 unless $schema->get_table($name)
200 0 30 unless $field
202 27 3 if $required
211 2 42 if (my $view_of = $def->{'x-view-of'})
220 29 9 unless ($m2m or $props->{$relational_id_field})
224 17 25 unless $def->{'required'}
230 14 187 if (my $ref = $thisprop->{'$ref'}) { }
13 174 elsif (($thisprop->{'type'} // '') eq 'array') { }
241 13 0 if (my $ref = $thisprop->{'items'}{'$ref'})
244 11 2 if ($args->{'snake_case'}) { }
264 38 136 if ($propname eq ($relational_id_field // '')) { }
4 132 elsif ($propname eq ($def->{'x-id-field'} // '')) { }
275 54 120 if ($field and $prop2required{$propname} and $propname ne $relational_id_field)
279 4 38 if ($m2m)
307 2 2 exists $_->{'$ref'} ? :
321 25 171 if (my $ref = $theseprops->{$propname}{'$ref'} || $theseprops->{$propname}{'items'} && $theseprops->{$propname}{'items'}{'$ref'})
341 21 3 if $thisprop->{'$ref'} or $thisprop->{'items'} and $thisprop->{'items'}{'$ref'}
343 5 131 if (($thisprop->{'type'} // '') eq 'object') { }
0 131 elsif ($thisprop->{'items'} and ($thisprop->{'items'}{'type'} // '') eq 'object') { }
353 5 0 if ($args->{'snake_case'}) { }
374 19 142 if $thisprop->{'$ref'}
376 139 3 unless $thisprop->{'items'} and ($thisprop->{'items'}{'type'} // '') ne 'object'
379 2 1 if ($args->{'snake_case'}) { }
410 135 10 unless $thisprop->{'$ref'} or $thisprop->{'items'} and $thisprop->{'items'}{'$ref'}
413 19 10 if ($thisprop->{'$ref'}) { }
10 0 elsif ($thisprop->{'items'} and $thisprop->{'items'}{'$ref'}) { }
422 26 3 unless $def2aP{_ref2def($refname)}
451 141 13 unless $thisprop->{'$ref'} or $thisprop->{'items'} and $thisprop->{'items'}{'$ref'}
454 16 13 if ($thisprop->{'$ref'}) { }
13 0 elsif ($thisprop->{'items'} and $thisprop->{'items'}{'$ref'}) { }
464 27 2 unless $def2nonobj{$refdef}
480 10 2 if ($args->{'snake_case'}) { }
516 2 2 if ($f1_fromkey eq $f2_fromkey and $f1->{'from'} eq $f2->{'from'})
521 3 1 if ($args->{'snake_case'}) { }
563 0 35 unless $SQL::Translator::Parser::OpenAPI::a->{'from'} cmp $SQL::Translator::Parser::OpenAPI::b->{'from'}
579 14 428 if $thisprop->{$name}
592 38 2 if ($theseprops->{'id'} and $theseprops->{'id'}{'type'} =~ /int/ or not $theseprops->{'id'}) { }
0 2 elsif ($thisdef->{'x-id-field'} and $$theseprops{$thisdef->{'x-id-field'}}{'type'} =~ /int/) { }
618 190 1246 ref $_[0] ? :
626 5 40 unless _maybe_deref($real)
627 0 28 ref $mapped{$_} ? :