← 返回刚才阅读的位置

知识卡片

操作参考卡 · 10296.b.1.c.3.a · 生成模型:未记录

拆分编辑并打包交付

理解等级:中级

用 redocly split 把大定义拆成可并行编辑的路径和组件,根文件保留索引。若需单独审查或版本化,可把子文件整理成有效 OpenAPI 文档。发布时运行 redocly bundle openapi.yaml –output bundled.yaml,让只接受单文件的下游也能消费构建制品。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    参考来源

    - 位置:《Automating API Delivery APIOps with OpenAPI》《第 08 章 API 制品的源代码阶段治理》(8.13 Reusing API objects: Multifile API definitions;来源项目 book-source,extracted/Automating API Delivery APIOps with OpenAPI/_epub-src/OEBPS/Text/chapter-8.xhtml#p262) - 结论依据:原文说明 bundle 将外部引用归并为单一 OpenAPI 定义。 - 原始内容:To combine your multifile API definitions into a single file (e.g., for use in tools that don’t support external references), you can bundle them. Bundling involves pulling external references from different files or URLs and adding those references to the components object of the OpenAPI definition.