def get_function_parameters(function):
    """
    Return a list of query parameters that are documented
    using api.decorators.query_arg
    """
    parameters = []
    for name, description, return_type, required in getattr(function, 'doc_query', []):
        parameters.append({
            'name': name,
            'description': description,
            'type': return_type,
            'paramType': 'query',
            'required': bool(required),
        })
    return parameters