← 返回功能頁
技術文件
DOCS ap-docs LibreOffice Writer
技術文件
一鍵生成
API 規格 → AI 排版 → 匯出 Word/PDF
① 貼上 API 規格 / 大綱 ② Agent 排版 & 結構化 ③ 匯出 DOCX + PDF
// Agent 工作階段日誌
U
"從我們的 OpenAPI 規格生成 API 參考文件。企業格式,包含 Python 和 JS 範例,變更日誌章節,匯出 DOCX 和 PDF。"
AP
// 規劃執行順序
- → 解析 openapi.yaml — 提取端點和 Schema
- → 套用企業 .dotx 範本
- → 生成含參數和回應的端點章節
- → 插入 Python + JS 程式碼範例
- → 自動生成目錄 + 索引 + changelog
agentputer — ap-docs executor
$ ap-docs new --type api-reference --template enterprise-docs
✓ Document created from enterprise template
$ ap-docs parse-openapi --input openapi.yaml --sections endpoints,schemas
✓ Parsed: 42 endpoints, 18 request/response schemas
$ ap-docs generate-sections --code-examples python,javascript
✓ 42 endpoint sections with dual-language code blocks
$ ap-docs export --word --pdf --toc --index
✓ api-reference-v2.docx (84 pages) · api-reference-v2.pdf
elapsed: 54s
📝api-reference-v2.docx84 pages · enterprise
// 此情境支援的功能
📋
OpenAPI / Swagger 匯入
解析 YAML 或 JSON 規格檔案,自動生成端點章節。
💻
多語言程式碼範例
為每個端點自動生成 curl、Python、JavaScript、Go、Java 範例。
📑
自動目錄 + 索引
從標題生成目錄和全文索引,PDF 中可點擊導覽。
🏢
企業範本支援
套用含公司 Logo、頁首和頁尾的 .dotx 範本。
📄
多格式輸出
匯出為 DOCX、PDF、ODT 或 HTML。
🔄
規格變更自動更新
以更新後的規格檔案重新執行,文件增量更新。