Branch Coverage

blib/lib/Modern/OpenAPI/Generator/CodeGen/ClientModels.pm
Criterion Covered Total %
branch 43 68 63.2


line true false branch
26 0 4 unless ref $schemas eq "HASH" and %$schemas
33 0 5 unless ref $sch eq "HASH"
34 0 5 if _schema_skipped($sch)
38 5 0 if length $pm
44 0 6 if $sch->{'allOf'} or $sch->{'oneOf'} or $sch->{'anyOf'}
45 6 0 if ($sch->{'type'} // "") eq "object" and ref $sch->{'properties'} eq "HASH"
57 10 1 unless defined $ref and $ref =~ m[\#/components/schemas/([^/]+)\z]u
69 4 6 if $required
88 8 10 if (my $p = $opt{'purpose'})
91 10 8 if (my $sn = $opt{'schema_name'})
94 0 18 if (my $sd = $opt{'schema_description'})
181 10 0 if ($pname =~ /^[a-zA-Z_]\w*$/a)
192 0 5 unless ref $props eq "HASH" and %$props
202 0 10 unless ref $ps eq "HASH"
207 1 9 if length $bld
213 0 10 unless ref $ps eq "HASH"
220 5 0 if (@to_json_lines)
246 1 4 if (@buildargs)
314 1 9 if (my $r = _ref_name($ps->{'$ref'} // ""))
317 0 1 $r eq $schema_name ? :
0 1 !$all_schemas->{$r} || _schema_skipped($all_schemas->{$r}) ? :
322 0 1 if $inner eq "HashRef"
332 1 8 if (($ps->{'type'} // "") eq "array" and ref $ps->{'items'} eq "HASH")
334 0 1 if (my $r = _ref_name($it->{'$ref'} // ""))
337 0 0 $r eq $schema_name ? :
0 0 !$all_schemas->{$r} || _schema_skipped($all_schemas->{$r}) ? :
346 0 0 if $inner eq "ArrayRef[HashRef]"
356 0 1 if (($it->{'type'} // '') eq 'number') { }
0 1 elsif (($it->{'type'} // '') eq 'integer') { }
367 1 1 if ($t eq "string" and ref $ps->{'enum'} eq "ARRAY" and @{$ps->{'enum'};})
373 1 6 if ($t eq "integer")
377 1 5 if ($t eq "number")
381 4 1 if ($t eq "boolean")
388 0 1 if ($t eq "object")