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
preprocess_spec.py 文件源码
python
阅读 30
收藏 0
点赞 0
评论 0
评论列表
文章目录