File tree 1 file changed +12
-12
lines changed
1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -302,18 +302,18 @@ def is_valid(errs_it):
302
302
),
303
303
)
304
304
305
- for keyword in [
306
- " properties" , "additionalProperties" , "unevaluatedProperties" ,
307
- ]:
308
- if keyword in schema :
309
- schema_value = schema [ keyword ]
310
- if validator . is_type ( schema_value , "boolean" ) and schema_value :
311
- evaluated_keys += instance . keys ()
312
-
313
- elif validator . is_type ( schema_value , "object" ):
314
- for property in schema_value :
315
- if property in instance :
316
- evaluated_keys . append ( property )
305
+ properties = schema . get ( "properties" )
306
+ if validator . is_type ( properties , "object" ):
307
+ evaluated_keys += properties . keys () & instance . keys ()
308
+
309
+ for keyword in [ "additionalProperties" , "unevaluatedProperties" ]:
310
+ if ( subschema := schema . get ( keyword )) is None :
311
+ continue
312
+ evaluated_keys += (
313
+ key
314
+ for key , value in instance . items ()
315
+ if is_valid ( validator . descend ( value , subschema ))
316
+ )
317
317
318
318
if "patternProperties" in schema :
319
319
for property in instance :
You can’t perform that action at this time.
0 commit comments