Condition Coverage

blib/lib/GraphQL/Plugin/Convert/OpenAPI.pm
Criterion Covered Total %
condition 68 82 82.9


and 2 conditions

line l !l condition
232 581 88 $required{$prop} && 'non_null'
444 52 157 $_->{'required'} && 'non_null'

and 3 conditions

line !l l&&!r l&&r condition
35 88 270 15 $modifier eq 'non_null' and ref $typespec eq 'ARRAY'
358 15 0 $modifier eq 'non_null' and ref $typespec eq 'ARRAY' and $typespec->[0] eq 'non_null'
95 6 0 3 ref $root_value eq 'HASH' and $type2info->{$parent_type}
0 0 3 ref $root_value eq 'HASH' and $type2info->{$parent_type} and my $prop = $type2info->{$parent_type}{'field2prop'}{$field_name}
158 16 1 1050 $info and %$info
160 825 11 214 $info->{'$ref'} and ($info->{'type'} // '') ne 'array'
166 815 15 2 ($info->{'type'} // '') eq 'object' and not $info->{'properties'}
210 157 567 11 ($info->{'type'} // '') eq 'string' and ($info->{'format'} // '') eq 'date-time'
512 4 12 133 !$defs->{$_}{'allOf'} && ($defs->{$_}{'type'} // '') ne 'array'

or 2 conditions

line l !l condition
52 14 3 $type2info->{$type} || {}
109 0 0 $property // die("OpenAPI.resolver could not resolve '${field_name}'\n")
160 224 1 $info->{'type'} // ''
166 830 2 $info->{'type'} // ''
177 4 2 $info->{'additionalProperties'} // {'type', 'string'}
210 735 0 $info->{'type'} // ''
13 565 $info->{'format'} // ''
213 724 0 $TYPEMAP{$info->{'type'}} // die("'${maybe_name}' unknown data type: @{[$info->{'type'}];}\n")
287 2 19 $trimmed2suffix{$trimmed}++ || ''
329 0 0 $name2type->{$typename} ||= {'name', $typename, 'kind', 'union', 'types', $types2}
374 4 35 $name2type->{$input_name} ||= {'name', $input_name, 'kind', 'input', $typedef->{'description'} ? ('description', $typedef->{'description'}) : (), 'fields', {map({my $fielddef = $typedef->{'fields'}{$_};
433 20 189 $type2info->{$typename} || {}

or 3 conditions

line l !l&&r !l&&!r condition
52 7 6 11 $TYPE2SCALAR{$type} or +($type2info->{$type} || {})->{'is_enum'}
166 4 7 825 $info->{'additionalProperties'} or ($info->{'type'} // '') eq 'object' and not $info->{'properties'}
189 17 0 813 $info->{'properties'} or $info->{'allOf'}
0 5 808 $info->{'properties'} or $info->{'allOf'} or $info->{'enum'}
355 272 6 39 $TYPE2SCALAR{$type} or $name2type->{$type}{'kind'} eq 'enum'
278 0 39 $TYPE2SCALAR{$type} or $name2type->{$type}{'kind'} eq 'enum' or $name2type->{$type}{'kind'} eq 'input'
402 115 1 0 $info->{'operationId'} || $method . '_' . _trim_name($path)
448 46 64 6 $info->{'summary'} || $info->{'description'}
477 16 22 2 $maybe_type->{'kind'} ne 'type' or not $maybe_type->{'interfaces'}