Condition Coverage

blib/lib/JSON/Schema/Modern/Document/OpenAPI.pm
Criterion Covered Total %
condition 114 143 79.7


and 3 conditions

line !l l&&!r l&&r condition
158 0 359 30 defined $oad_version[2] and (split(/\./u, $max_supported, 0))[2] < $oad_version[2]
167 0 7 1 $oad_version[0] == 3 and $oad_version[1] < 2
175 0 1 6 assert_keyword_type($state, $schema, "string") and assert_uri_reference($state, $schema)
1 6 0 assert_keyword_type($state, $schema, "string") and assert_uri_reference($state, $schema) and !($$schema{'$self'} =~ /#/u) || E($state, '$self cannot contain a fragment')
186 1 1 9 assert_keyword_type($state, $schema, "string") and assert_uri_reference($state, $schema)
205 370 13 1 $self->_has_metaschema_uri and $self->metaschema_uri eq {"3.1" => "https://raw.githubusercontent.com/karenetheridge/OpenAPI-Modern/master/share/3.1/strict-schema.json","3.2" => "https://raw.githubusercontent.com/karenetheridge/OpenAPI-Modern/master/share/3.2/strict-schema.json"}->{"3.1"} =~ s[/3.1/][/]ru
210 370 9 5 $self->_has_metaschema_uri and $self->metaschema_uri eq ({"3.1" => "https://raw.githubusercontent.com/karenetheridge/OpenAPI-Modern/master/share/3.1/strict-schema.json","3.2" => "https://raw.githubusercontent.com/karenetheridge/OpenAPI-Modern/master/share/3.2/strict-schema.json"}->{$self->oas_version} // "")
247 0 377 5 $self->_has_metaschema_uri and $self->metaschema_uri eq ({"3.1" => "https://raw.githubusercontent.com/karenetheridge/OpenAPI-Modern/master/share/3.1/strict-schema.json","3.2" => "https://raw.githubusercontent.com/karenetheridge/OpenAPI-Modern/master/share/3.2/strict-schema.json"}->{$self->oas_version} // "")
286 30 1 2 ($$data{"type"} // "") eq "array" and not exists $$data{"items"}
289 30 1 2 exists $$data{"exclusiveMinimum"} and not exists $$data{"minimum"}
292 30 1 2 exists $$data{"exclusiveMaximum"} and not exists $$data{"maximum"}
297 150 2 3 $entity eq "path-item" and exists $$data{"\$ref"}
326 11065 432 28 ($entity // "") eq "path-item" and exists $$data{"\$ref"}
348 9727 1488 465 $entity and $entity eq "path-item"
11215 434 31 $entity and $entity eq "path-item" and exists $$data{"\$ref"}
364 57 0 1 ($e->keyword // "") eq "not" and $e->absolute_keyword_location->fragment eq "/\$defs/parameters/not"
57 0 1 ($e->keyword // "") eq "not" and $e->absolute_keyword_location->fragment eq "/\$defs/parameters/not" and $e->absolute_keyword_location->clone->fragment(undef) eq {"3.0" => "https://spec.openapis.org/oas/3.0/schema/2024-10-18","3.1" => "https://spec.openapis.org/oas/3.1/schema/2025-11-23","3.2" => "https://spec.openapis.org/oas/3.2/schema/2025-11-23"}->{$self->oas_version}
481 3 43 3 $seen_names{$name} == 1 and not exists $$variables_obj{$name}
488 35 8 6 exists $$variables_obj{$varname}{"enum"} and not grep(($$variables_obj{$varname}{"default"} eq $_), @{$$variables_obj{$varname}{"enum"}})
503 4 7 1 exists $$tag{"parent"} and not exists $tag_to_index{$$tag{"parent"}}
532 220 560 0 $idx != $#json_schema_paths and substr($json_schema_paths[$idx], 0, length($real_json_schema_paths[-1]) + 1) eq $real_json_schema_paths[-1] . '/'
585 0 0 1 not keys %{$$schema{"paths"}} and exists $$schema{"components"}
594 0 0 1 $schema and keys %$schema == 2
0 0 1 $schema and keys %$schema == 2 and ($$schema{"type"} // "") eq "string"
0 0 1 $schema and keys %$schema == 2 and ($$schema{"type"} // "") eq "string" and ($$schema{"format"} // "") eq "binary"
607 1 0 1 delete $$subschema{"nullable"} and exists $$subschema{"type"}
611 4 1 1 exists $$subschema{"enum"} and @{$$subschema{"enum"}} == 1
635 0 1 1 exists $$subschema{"description"} and $$subschema{"description"} eq ""

or 2 conditions

line l !l condition
77 5 1 $_[0]{"_operation_tags"}{$_[1]} // []
145 1 1 $$schema{"openapi"} // ""
394 1 $$schema{"openapi"} // ""
210 14 0 {"3.1" => "https://raw.githubusercontent.com/karenetheridge/OpenAPI-Modern/master/share/3.1/strict-schema.json","3.2" => "https://raw.githubusercontent.com/karenetheridge/OpenAPI-Modern/master/share/3.2/strict-schema.json"}->{$self->oas_version} // ""
355 24 {"3.1" => "https://raw.githubusercontent.com/karenetheridge/OpenAPI-Modern/master/share/3.1/strict-dialect.json","3.2" => "https://raw.githubusercontent.com/karenetheridge/OpenAPI-Modern/master/share/3.2/strict-dialect.json"}->{$self->oas_version} // ""
247 358 24 {"3.1" => "https://raw.githubusercontent.com/karenetheridge/OpenAPI-Modern/master/share/3.1/strict-schema.json","3.2" => "https://raw.githubusercontent.com/karenetheridge/OpenAPI-Modern/master/share/3.2/strict-schema.json"}->{$self->oas_version} // ""
286 17 16 $$data{"type"} // ""
304 16 0 $$state{"initial_schema_uri"}->fragment // ""
326 1878 9647 $entity // ""
342 3 436 $$data{"tags"} // []
364 58 0 $e->keyword // ""
410 339 30 $$schema{"paths"} // {}
459 46 20 $seen_url{$servers_location} // {}
493 2 367 $$schema{"tags"} // []
495 2 367 $$schema{"tags"} // []
594 1 0 $$schema{"type"} // ""
1 0 $$schema{"format"} // ""
663 617 0 $$subschema_state{"references"} // []
684 3 2 $$existing{"anchors"} // {}

or 3 conditions

line l !l&&r !l&&!r condition
175 5 0 1 !($$schema{'$self'} =~ /#/u) || E($state, '$self cannot contain a fragment')
180 5 381 0 $$schema{"\$self"} // ()
210 5 0 379 $self->_has_metaschema_uri and $self->metaschema_uri eq ({"3.1" => "https://raw.githubusercontent.com/karenetheridge/OpenAPI-Modern/master/share/3.1/strict-schema.json","3.2" => "https://raw.githubusercontent.com/karenetheridge/OpenAPI-Modern/master/share/3.2/strict-schema.json"}->{$self->oas_version} // "") or $json_schema_dialect eq ({"3.1" => "https://raw.githubusercontent.com/karenetheridge/OpenAPI-Modern/master/share/3.1/strict-dialect.json","3.2" => "https://raw.githubusercontent.com/karenetheridge/OpenAPI-Modern/master/share/3.2/strict-dialect.json"}->{$self->oas_version} // "")
212 24 0 360 $json_schema_dialect eq {"3.0" => "https://spec.openapis.org/oas/3.0/schema/2024-10-18#/definitions/Schema","3.1" => "https://spec.openapis.org/oas/3.1/dialect/2024-11-10","3.2" => "https://spec.openapis.org/oas/3.2/dialect/2025-09-17"}->{"3.0"} or $json_schema_dialect eq {"3.0" => "https://spec.openapis.org/oas/3.0/schema/2024-10-18#/definitions/Schema","3.1" => "https://spec.openapis.org/oas/3.1/dialect/2024-11-10","3.2" => "https://spec.openapis.org/oas/3.2/dialect/2025-09-17"}->{"3.0"} =~ s/\b\d{4}-\d{2}-\d{2}\b/latest/ru
300 12 4 0 $metaschema_doc //= $evaluator->_get_resource($self->metaschema_uri)->{"document"}
336 437 2 11241 $$schema{"\$ref"} eq "#/\$defs/operation" or $$schema{"\$ref"} eq "#/definitions/Operation"
650 118 45 617 get_type($schema) eq "boolean" or not keys %$schema