Branch Coverage

blib/lib/Data/Validate/OpenAPI.pm
Criterion Covered Total %
branch 21 52 40.3


line true false branch
34 0 7 exists $api->{'paths'}{$path}{'parameters'} ? :
7 0 exists $api->{'paths'}{$path}{$method}{'parameters'} ? :
0 7 exists $api->{'paths'}{$path}{$method}{'requestBody'} ? :
39 0 7 if (&blessed($par_hash))
45 7 0 if $description->{'schema'}
46 1 6 unless (exists $par_hash->{$name})
47 0 1 if ($schema and exists $schema->{'default'})
53 0 6 if ($schema and $schema->{'type'} eq 'array') { }
58 0 0 ref $par_hash->{$name} eq 'ARRAY' ? :
59 0 0 if @values
62 4 2 if defined $value
73 6 0 if $schema
77 0 6 if (not defined $format) { }
1 5 elsif ($format eq 'date-time') { }
0 5 elsif ($format eq 'email') { }
5 0 elsif ($format eq 'integer') { }
0 0 elsif ($format eq 'ipv4') { }
0 0 elsif ($format eq 'ipv6') { }
0 0 elsif ($format eq 'uri') { }
0 0 elsif ($format eq 'uuid') { }
95 0 0 if ($value =~ /^([0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})$/i) { }
102 2 4 unless defined $value
104 0 4 if ($schema and $schema->{'enum'})
106 0 0 unless defined $value
109 0 4 if ($schema and $schema->{'pattern'})
110 0 0 unless $value =~ /^($schema->{'pattern'})$/