Branch Coverage

blib/lib/JSON/Schema/Modern/Vocabulary/OpenAPI.pm
Criterion Covered Total %
branch 24 26 92.3


line true false branch
31 1 11 unless assert_keyword_type($state, $schema, "object")
35 1 10 unless exists $schema->{'discriminator'}{'propertyName'}
37 1 9 unless is_type("string", $schema->{'discriminator'}{'propertyName'})
40 8 1 if (exists $schema->{'discriminator'}{'mapping'})
41 1 7 unless assert_keyword_type({%$state, "_schema_path_suffix", "mapping"}, $schema, "object")
43 0 7 unless is_type("object", $schema->{'discriminator'}{'mapping'})
46 1 6 unless is_type("string", $uri)
51 1 7 unless grep exists $schema->{$_}, ("oneOf", "anyOf", "allOf")
58 0 6 unless is_type("object", $data)
64 1 5 unless exists $data->{$discriminator_key}
71 2 3 if (my $component_schema_info = $state->{'evaluator'}->_fetch_from_uri($uri)) { }
2 1 elsif (exists $schema->{'discriminator'}{'mapping'} and exists $schema->{'discriminator'}{'mapping'}{$discriminator_value}) { }
85 2 2 unless $self->eval_subschema_at_uri($data, $schema, $state, $uri)