Branch Coverage

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


line true false branch
109 35 38 if ($opt{'properties'})
114 0 135 unless $schema->{'required'}
141 20 409 if (is_type($prop->{'type'}, "boolean") and defined $check_item{$prop_name})
143 12 8 if ($value eq 'false' or not $value) { }
153 24 293 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 35 if ($prop->{'readOnly'} and exists $check_item{$prop_name})
215 2 36 if (my(@errors) = $self->validate($data))
224 2 34 if (my $error = $@)
242 2 33 if (my(@errors) = $self->validate($data, "properties", [keys %$data]))
251 2 31 if (my $error = $@)
283 226 515 if $json_schema->{'x-view'}
287 113 628 if ($json_schema->{'x-view'} and not $props)
293 0 741 unless $props
296 24 717 ref $id_field eq 'ARRAY' ? :
302 2 763 unless ($props->{$field})