@@ -291,7 +291,7 @@ def type(validator, types, instance, schema):
291291 yield ValidationError (_utils .types_msg (instance , types ))
292292
293293
294- def properties_draft4 (validator , properties , instance , schema ):
294+ def properties (validator , properties , instance , schema ):
295295 if not validator .is_type (instance , "object" ):
296296 return
297297
@@ -306,7 +306,7 @@ def properties_draft4(validator, properties, instance, schema):
306306 yield error
307307
308308
309- def required_draft4 (validator , required , instance , schema ):
309+ def required (validator , required , instance , schema ):
310310 if not validator .is_type (instance , "object" ):
311311 return
312312 for property in required :
@@ -328,12 +328,22 @@ def maxProperties_draft4(validator, mP, instance, schema):
328328 yield ValidationError ("%r has too many properties" % (instance ,))
329329
330330
331- def allOf (validator , allOf , instance , schema ):
331+ def allOf_draft4 (validator , allOf , instance , schema ):
332332 for index , subschema in enumerate (allOf ):
333333 for error in validator .descend (instance , subschema , schema_path = index ):
334334 yield error
335335
336336
337+ def allOf_draft6 (validator , allOf , instance , schema ):
338+ for index , subschema in enumerate (allOf ):
339+ if subschema == True : # FIXME: Messages
340+ subschema = {}
341+ elif subschema == False :
342+ subschema = {"not" : {}}
343+ for error in validator .descend (instance , subschema , schema_path = index ):
344+ yield error
345+
346+
337347def oneOf_draft4 (validator , oneOf , instance , schema ):
338348 subschemas = enumerate (oneOf )
339349 all_errors = []
@@ -372,7 +382,7 @@ def anyOf_draft4(validator, anyOf, instance, schema):
372382 )
373383
374384
375- def not_draft4 (validator , not_schema , instance , schema ):
385+ def not_ (validator , not_schema , instance , schema ):
376386 if validator .is_valid (instance , not_schema ):
377387 yield ValidationError (
378388 "%r is not allowed for %r" % (not_schema , instance )
0 commit comments