raml.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:ramlwrap 作者: jmons 项目源码 文件源码
def raml_url_patterns(raml_filepath, function_map):
    """
    creates url patterns that match the endpoints in the raml file, so can be quickly inserted into django urls.
    Note these
    :param raml_filepath: the path to the raml file (not a file pointer)
    :param function_map: a dictionary of urls to functions for mapping
    :return:
    """

    tree = pyraml.parser.load(raml_filepath)

    resource_map = _get_resource_for_tree(tree)

    patterns = _generate_patterns(resource_map, function_map)

    return patterns
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号