Branch Coverage

blib/lib/Yancy/Model/Schema.pm
Criterion Covered Total %
branch 33 36 91.6


line true false branch
109 35 41 if ($opt{'properties'})
114 0 135 unless $schema->{'required'}
141 20 418 if (is_type($prop->{'type'}, "boolean") and defined $check_item{$prop_name})
143 12 8 if ($value eq 'false' or not $value) { }
153 24 297 if (is_type($prop->{'type'}, "string") and $prop->{'format'} and $prop->{'format'} =~ /^(?:date-time|date|time)$/u)
154 1 23 if (exists $check_item{$prop_name} and not $check_item{$prop_name}) { }
20 3 elsif ((($check_item{$prop_name} // $prop->{'default'}) // '') eq 'now') { }
164 0 103 if ($prop->{'format'} and $prop->{'format'} eq "password" and not $check_item{$prop_name})
171 1 38 if ($prop->{'readOnly'} and exists $check_item{$prop_name})
215 2 39 if (my(@errors) = $self->validate($data))
224 2 37 if (my $error = $@)
242 2 33 if (my(@errors) = $self->validate($data, "properties", [keys %$data]))
251 2 31 if (my $error = $@)
283 232 635 if $json_schema->{'x-view'}
287 116 751 if ($json_schema->{'x-view'} and not $props)
293 0 867 unless $props
296 48 819 ref $id_field eq 'ARRAY' ? :
302 2 913 unless ($props->{$field})