File tree Expand file tree Collapse file tree 2 files changed +8
-10
lines changed
Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -606,7 +606,7 @@ impl InstanceValidator {
606606 }
607607
608608 // Basic structural validation
609- colon_count >= 2 && colon_count <= 7
609+ ( 2 ..= 7 ) . contains ( & colon_count )
610610 }
611611
612612 /// Validates hostname format.
Original file line number Diff line number Diff line change @@ -1574,15 +1574,13 @@ impl SchemaValidator {
15741574 }
15751575
15761576 // Resolve reference
1577- if ref_str. starts_with ( "#/definitions/" ) {
1578- if self . resolve_ref ( & ref_str, root_schema) . is_none ( ) {
1579- result. add_error ( ValidationError :: schema_error (
1580- SchemaErrorCode :: SchemaExtendsNotFound ,
1581- format ! ( "$extends reference not found: {}" , ref_str) ,
1582- & ref_path,
1583- locator. get_location ( & ref_path) ,
1584- ) ) ;
1585- }
1577+ if ref_str. starts_with ( "#/definitions/" ) && self . resolve_ref ( & ref_str, root_schema) . is_none ( ) {
1578+ result. add_error ( ValidationError :: schema_error (
1579+ SchemaErrorCode :: SchemaExtendsNotFound ,
1580+ format ! ( "$extends reference not found: {}" , ref_str) ,
1581+ & ref_path,
1582+ locator. get_location ( & ref_path) ,
1583+ ) ) ;
15861584 }
15871585 // External references would be validated here if import is enabled
15881586 }
You can’t perform that action at this time.
0 commit comments