api-documentation

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

API Documentation Workflow

API文档工作流

Overview

概述

Specialized workflow for creating comprehensive API documentation including OpenAPI/Swagger specs, developer guides, code examples, and interactive documentation.
用于创建全面API文档的专用工作流,涵盖OpenAPI/Swagger规范、开发者指南、代码示例和交互式文档。

When to Use This Workflow

何时使用此工作流

Use this workflow when:
  • Creating API documentation
  • Generating OpenAPI specs
  • Writing developer guides
  • Adding code examples
  • Setting up API portals
在以下场景使用此工作流:
  • 创建API文档
  • 生成OpenAPI规范
  • 编写开发者指南
  • 添加代码示例
  • 搭建API门户

Workflow Phases

工作流阶段

Phase 1: API Discovery

阶段1:API发现

Skills to Invoke

需调用的技能

  • api-documenter
    - API documentation
  • api-design-principles
    - API design
  • api-documenter
    - API文档
  • api-design-principles
    - API设计

Actions

操作步骤

  1. Inventory endpoints
  2. Document request/response
  3. Identify authentication
  4. Map error codes
  5. Note rate limits
  1. 盘点接口端点
  2. 记录请求/响应信息
  3. 识别认证方式
  4. 映射错误代码
  5. 记录速率限制

Copy-Paste Prompts

可复制粘贴的提示词

Use @api-documenter to discover and document API endpoints
Use @api-documenter to discover and document API endpoints

Phase 2: OpenAPI Specification

阶段2:OpenAPI规范

Skills to Invoke

需调用的技能

  • openapi-spec-generation
    - OpenAPI
  • api-documenter
    - API specs
  • openapi-spec-generation
    - OpenAPI
  • api-documenter
    - API规范

Actions

操作步骤

  1. Create OpenAPI schema
  2. Define paths
  3. Add schemas
  4. Configure security
  5. Add examples
  1. 创建OpenAPI schema
  2. 定义路径
  3. 添加schemas
  4. 配置安全设置
  5. 添加示例

Copy-Paste Prompts

可复制粘贴的提示词

Use @openapi-spec-generation to create OpenAPI specification
Use @openapi-spec-generation to create OpenAPI specification

Phase 3: Developer Guide

阶段3:开发者指南

Skills to Invoke

需调用的技能

  • api-documentation-generator
    - Documentation
  • documentation-templates
    - Templates
  • api-documentation-generator
    - 文档生成
  • documentation-templates
    - 文档模板

Actions

操作步骤

  1. Create getting started
  2. Write authentication guide
  3. Document common patterns
  4. Add troubleshooting
  5. Create FAQ
  1. 创建快速入门内容
  2. 编写认证指南
  3. 记录通用模式
  4. 添加故障排查内容
  5. 创建FAQ

Copy-Paste Prompts

可复制粘贴的提示词

Use @api-documentation-generator to create developer guide
Use @api-documentation-generator to create developer guide

Phase 4: Code Examples

阶段4:代码示例

Skills to Invoke

需调用的技能

  • api-documenter
    - Code examples
  • tutorial-engineer
    - Tutorials
  • api-documenter
    - 代码示例
  • tutorial-engineer
    - 教程编写

Actions

操作步骤

  1. Create example requests
  2. Write SDK examples
  3. Add curl examples
  4. Create tutorials
  5. Test examples
  1. 创建请求示例
  2. 编写SDK示例
  3. 添加curl示例
  4. 创建教程
  5. 测试示例

Copy-Paste Prompts

可复制粘贴的提示词

Use @api-documenter to generate code examples
Use @api-documenter to generate code examples

Phase 5: Interactive Docs

阶段5:交互式文档

Skills to Invoke

需调用的技能

  • api-documenter
    - Interactive docs
  • api-documenter
    - 交互式文档

Actions

操作步骤

  1. Set up Swagger UI
  2. Configure Redoc
  3. Add try-it functionality
  4. Test interactivity
  5. Deploy docs
  1. 搭建Swagger UI
  2. 配置Redoc
  3. 添加“试用”功能
  4. 测试交互性
  5. 部署文档

Copy-Paste Prompts

可复制粘贴的提示词

Use @api-documenter to set up interactive documentation
Use @api-documenter to set up interactive documentation

Phase 6: Documentation Site

阶段6:文档站点

Skills to Invoke

需调用的技能

  • docs-architect
    - Documentation architecture
  • wiki-page-writer
    - Documentation
  • docs-architect
    - 文档架构
  • wiki-page-writer
    - 文档编写

Actions

操作步骤

  1. Choose platform
  2. Design structure
  3. Create pages
  4. Add navigation
  5. Configure search
  1. 选择平台
  2. 设计结构
  3. 创建页面
  4. 添加导航
  5. 配置搜索功能

Copy-Paste Prompts

可复制粘贴的提示词

Use @docs-architect to design API documentation site
Use @docs-architect to design API documentation site

Phase 7: Maintenance

阶段7:维护

Skills to Invoke

需调用的技能

  • api-documenter
    - Doc maintenance
  • api-documenter
    - 文档维护

Actions

操作步骤

  1. Set up auto-generation
  2. Configure validation
  3. Add review process
  4. Schedule updates
  5. Monitor feedback
  1. 搭建自动生成机制
  2. 配置验证规则
  3. 添加审核流程
  4. 安排更新计划
  5. 监控反馈

Copy-Paste Prompts

可复制粘贴的提示词

Use @api-documenter to set up automated doc generation
Use @api-documenter to set up automated doc generation

Quality Gates

质量检查项

  • OpenAPI spec complete
  • Developer guide written
  • Code examples working
  • Interactive docs functional
  • Documentation deployed
  • OpenAPI规范已完成
  • 开发者指南已编写
  • 代码示例可正常运行
  • 交互式文档功能正常
  • 文档已部署

Related Workflow Bundles

相关工作流包

  • documentation
    - Documentation
  • api-development
    - API development
  • development
    - Development
  • documentation
    - 文档编写
  • api-development
    - API开发
  • development
    - 开发流程