preprocess_spec.py 文件源码

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

项目:openshift-restclient-python 作者: openshift 项目源码 文件源码
def process_swagger(spec):
    spec = add_custom_objects_spec(spec)

    apply_func_to_spec_operations(spec, strip_tags_from_operation_id)

    operation_ids = {}
    apply_func_to_spec_operations(spec, lambda op, _: operator.setitem(
        operation_ids, op['operationId'], op))

    try:
        apply_func_to_spec_operations(
            spec, remove_watch_operations, operation_ids)
    except PreprocessingException as e:
        print(e.message)

    remove_model_prefixes(spec, 'io.k8s')

    inline_primitive_models(spec)

    return spec
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号