def METHOD_NAME(controller):
    """
        Decorator to compare request JSON with
        given json schema
        Args:
             controller (func): Controller function for the route
    """
    @wraps(controller)
    def wrapper(*args, **kw):
        try:
            inputs = schema(request)
            inputs.validate()
        except Exception as e:
            return error(str(e)), 400
        return controller(*args, **kw)
    return wrapper