Branch Coverage

blib/lib/Modern/OpenAPI/Generator/CodeGen/Docs.pm
Criterion Covered Total %
branch 66 160 41.2


line true false branch
12 0 13 unless defined $operation_id and length $operation_id
21 0 7 ref $tags eq 'ARRAY' && @$tags ? :
23 0 7 unless length $t
27 0 7 unless length $pascal
33 3 0 unless ref $tags eq "ARRAY" and @$tags
36 0 0 length $t ? :
41 0 29 unless defined $s
49 0 1 unless defined $ref and length $ref
50 1 0 if $ref =~ m[\#/components/schemas/([^/]+)\z]u
51 0 0 if $ref =~ m[/([^/]+)\z]u
65 0 11 unless ref $sch eq "HASH"
67 1 10 if (length $ref)
69 1 0 $for_doc_link && length $n ? :
72 1 9 if ($t eq "array" and ref $sch->{'items'} eq "HASH")
75 0 9 if ($t eq "object" and ref $sch->{'properties'} eq "HASH")
78 0 9 if $sch->{'format'}
87 0 6 if ref $item->{'parameters'} eq "ARRAY"
90 0 6 if ref $opobj->{'parameters'} eq "ARRAY"
98 0 3 @opsec ? :
100 3 0 unless @sec
104 0 0 unless ref $h eq "HASH"
114 0 0 unless ref $rb eq "HASH"
117 0 0 unless ref $json eq "HASH"
119 0 0 ref $sch eq 'HASH' ? :
126 0 4 if (ref $raw->{'servers'} eq "ARRAY" and @{$raw->{'servers'};})
131 0 4 if (length $base_url)
135 3 1 if ($client) { }
165 0 4 unless (@$ops)
166 0 0 if $client
167 0 0 unless $client
176 0 4 unless ref $schemas eq "HASH" and %$schemas
199 3 0 if (length $sum)
202 0 3 if (length $des)
207 0 3 if (@$params)
213 0 0 ref $sch eq 'HASH' ? :
220 0 0 $p->{'required'} ? :
225 0 3 if ($op->{'has_body'})
228 0 0 if (ref $rb eq "HASH" and $rb->{'description'})
232 0 0 if (ref $rs eq 'HASH') { }
233 0 0 if (my $ref = $rs->{'$ref'}) { }
0 0 elsif (($rs->{'type'} // '') eq 'object' and ref $rs->{'properties'} eq 'HASH') { }
235 0 0 length $n ? :
254 0 0 ref $ps eq 'HASH' ? :
0 0 $r{$k} ? :
0 0 ref $ps eq 'HASH' ? :
282 0 0 unless $p->{'required'}
286 0 3 if ($op->{'has_body'})
300 0 3 if (ref $raw->{'servers'} eq "ARRAY" and @{$raw->{'servers'};})
319 0 3 if (length $base_u)
361 0 5 if $depth > 3
362 0 5 unless ref $sch eq "HASH"
364 0 5 if ($ref)
366 0 0 unless length $n
369 0 5 unless ($sch->{'type'} // "") eq "object"
371 0 5 unless ref $props eq "HASH" and %$props
386 10 0 ref $ps eq 'HASH' ? :
10 0 ref $ps eq 'HASH' ? :
4 6 $r{$k} ? :
403 0 5 if (ref $sch eq "HASH" and length($sch->{'description'} // ""))
407 0 5 if (ref $sch ne "HASH")
413 0 5 if ($ref)
415 0 0 if (length $n and $n ne $name)
422 5 0 if (length $tbl) { }
439 0 4 unless ref $schemas eq "HASH"
469 3 1 if ($client) { }
1 0 elsif ($server and $local_test) { }
485 4 0 @rows ? :
496 0 4 if (length $desc)
522 3 1 if ($client)
526 3 0 @$ops ? :
528 3 0 if ($sync and $async) { }
0 0 elsif ($sync) { }
0 0 elsif ($async) { }
607 4 0 if ($server)
608 2 2 if ($local_test) { }
647 3 1 if ($ui)
668 0 4 if ($ui_only)
696 3 1 if ($client) { }
1 0 elsif ($server and $local_test) { }
726 4 0 if $client or $server and $local_test