Swagger 1.2 expects `required` to be a bool in the Parameter object, but
    a list of properties in a Model object.

def required_validator(validator, req, instance, schema):
    """Swagger 1.2 expects `required` to be a bool in the Parameter object, but
    a list of properties in a Model object.
    """
    if schema.get('paramType'):
        if req is True and not instance:
            return [ValidationError("%s is required" % schema['name'])]
        return []
    return _validators.required_draft4(validator, req, instance, schema)