def get_function_responses(function):
    """
    Return a list of responses that are documented using
    api.decorators.response
    """
    responses = []
    for code, description in getattr(function, 'doc_responses', []):
        responses.append({
            'code': code,
            'message': description
        })
    return responses