Branch Coverage

blib/lib/DBIx/Result/Convert/JSONSchema.pm
Criterion Covered Total %
branch 44 70 62.8


line true false branch
234 1 7 unless $source
244 6 1 unless $args->{'exclude_required'}
245 6 1 unless $args->{'include_required'}
246 6 1 unless $args->{'exclude_properties'}
253 1 6 $dependencies ? :
267 1 167 if $exclude_properties{$column}
275 0 167 unless my $json_type = $self->type_map->{$column_info->{'data_type'}}
282 6 161 if ($format_type)
287 119 48 if (not $format_type and $self->length_map->{$column_info->{'data_type'}})
293 7 160 if ($is_required_field or not $column_info->{'default_value'} || $column_info->{'is_nullable'} || $exclude_required{$column})
299 0 167 if ($column_info->{'default_value'} and not ref $column_info->{'default_value'})
304 12 0 if ($json_type eq 'enum' and $column_info->{'extra'} and $column_info->{'extra'}{'list'})
309 153 12 if (not $is_required_field and $column_info->{'is_nullable'})
310 12 141 if ($json_type eq 'enum') { }
320 4 163 if ($json_type eq 'number' and $decimals_to_pattern)
321 1 3 if ($column_info->{'size'} and ref $column_info->{'size'} eq 'ARRAY')
328 26 141 if ($self->pattern_map->{$column_info->{'data_type'}})
333 0 167 if (not $json_schema{'properties'}{$column}{'description'} and $has_schema_property_description)
342 0 167 if ($add_schema_properties)
349 2 165 if (my $overwrite_property = delete $overwrite_schema_properties->{$column})
353 1 1 $action eq 'merge' ? :
359 2 165 if (my $new_key = $overwrite_schema_property_keys->{$column})
389 0 0 unless ($property->{'type'})
390 0 0 if ($property->{'enum'})
397 0 0 if $property->{'type'} eq 'object'
400 0 0 if (ref $property->{'type'} eq 'ARRAY') { }
408 0 0 if $types{'null'}
411 0 0 if (grep {/^integer|number$/;} keys %types) { }
418 0 0 $description ? :
421 0 0 if (grep {/^integer$/;} keys %types and $property->{'maximum'}) { }
0 0 elsif (grep {/^string$/;} keys %types and $property->{'pattern'}) { }
443 0 119 if $column_info->{'is_auto_increment'}
448 29 90 if ($column_info->{'size'})
459 0 0 if ($column_info->{'extra'} and $column_info->{'extra'}{'unsigned'})
464 154 84 ref $self->length_map->{$column_info->{'data_type'}} eq 'ARRAY' ? :