Condition Coverage

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


and 2 conditions

line l !l condition
226 579 84 $required{$prop} && 'non_null'
438 52 157 $_->{'required'} && 'non_null'

and 3 conditions

line !l l&&!r l&&r condition
29 86 268 13 $modifier eq 'non_null' and ref $typespec eq 'ARRAY'
354 13 0 $modifier eq 'non_null' and ref $typespec eq 'ARRAY' and $typespec->[0] eq 'non_null'
89 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}
152 16 1 1042 $info and %$info
154 817 11 214 $info->{'$ref'} and ($info->{'type'} // '') ne 'array'
160 809 13 2 ($info->{'type'} // '') eq 'object' and not $info->{'properties'}
204 157 563 11 ($info->{'type'} // '') eq 'string' and ($info->{'format'} // '') eq 'date-time'
506 4 12 131 !$defs->{$_}{'allOf'} && ($defs->{$_}{'type'} // '') ne 'array'

or 2 conditions

line l !l condition
46 14 3 $type2info->{$type} || {}
103 0 0 $property // die("OpenAPI.resolver could not resolve '${field_name}'\n")
154 224 1 $info->{'type'} // ''
160 822 2 $info->{'type'} // ''
171 4 2 $info->{'additionalProperties'} // {'type', 'string'}
204 731 0 $info->{'type'} // ''
13 561 $info->{'format'} // ''
207 720 0 $TYPEMAP{$info->{'type'}} // die("'${maybe_name}' unknown data type: @{[$info->{'type'}];}\n")
281 2 19 $trimmed2suffix{$trimmed}++ || ''
323 0 0 $name2type->{$typename} ||= {'name', $typename, 'kind', 'union', 'types', $types2}
368 4 35 $name2type->{$input_name} ||= {'name', $input_name, 'kind', 'input', $typedef->{'description'} ? ('description', $typedef->{'description'}) : (), 'fields', {map({my $fielddef = $typedef->{'fields'}{$_}; $_, {%$fielddef, 'type', _make_input($fielddef->{'type'}, $name2type, $type2info)};} keys %{$$typedef{'fields'};})}}
427 20 189 $type2info->{$typename} || {}

or 3 conditions

line l !l&&r !l&&!r condition
46 7 6 11 $TYPE2SCALAR{$type} or +($type2info->{$type} || {})->{'is_enum'}
160 4 6 818 $info->{'additionalProperties'} or ($info->{'type'} // '') eq 'object' and not $info->{'properties'}
183 15 0 807 $info->{'properties'} or $info->{'allOf'}
0 5 802 $info->{'properties'} or $info->{'allOf'} or $info->{'enum'}
349 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'
396 115 1 0 $info->{'operationId'} || $method . '_' . _trim_name($path)
442 46 64 6 $info->{'summary'} || $info->{'description'}
471 16 22 2 $maybe_type->{'kind'} ne 'type' or not $maybe_type->{'interfaces'}