Api Reference Documentation

作者 secondsky88378361314fMIT227 个星标收录于 2026年10月8日更新于 2026年10月8日仓库10天前更新

Creates professional API documentation using OpenAPI specifications with endpoints, authentication, and interactive examples. Use when documenting REST APIs, creating SDK references, or building developer portals.

AI 生成的概览

指导使用 OpenAPI 3.0 规范、检查清单和最佳实践编写 API 参考文档。

功能
该技能提供为开发者集成编写 API 参考文档的指导。它给出 OpenAPI 3.0 规范示例,涵盖服务器、安全方案、路径、参数和数据结构,并附有文档检查清单和最佳实践建议。它还列出 Swagger Editor、Swagger UI、Redoc、Postman 和 Stoplight 等文档工具。该技能不包含脚本,本身也不生成文件。
适用场景
适用于编写 REST API 文档、创建 SDK 参考或搭建开发者门户的场景。适合需要在结构化参考中覆盖端点、认证、错误响应、速率限制和分页说明的工作。
运行要求
无需脚本或软件包,该技能仅为说明性内容。其中提到的 Swagger Editor、Swagger UI、Redoc、Postman 和 Stoplight 等工具均为可选的外部工具。

API Reference Documentation

Create comprehensive API documentation for developer integration.

OpenAPI 3.0 Specification

yaml
openapi: 3.0.3info:  title: E-Commerce API  version: 1.0.0  description: API for managing products and orders  contact:    email: [email protected]
servers:  - url: https://api.example.com/v1    description: Production  - url: https://staging-api.example.com/v1    description: Staging
security:  - bearerAuth: []
paths:  /products:    get:      summary: List products      tags: [Products]      parameters:        - name: limit          in: query          schema: { type: integer, default: 20 }        - name: category          in: query          schema: { type: string }      responses:        '200':          description: Product list          content:            application/json:              schema:                $ref: '#/components/schemas/ProductList'
components:  securitySchemes:    bearerAuth:      type: http      scheme: bearer      bearerFormat: JWT
  schemas:    Product:      type: object      required: [id, name, price]      properties:        id: { type: string, format: uuid }        name: { type: string, maxLength: 200 }        price: { type: number, minimum: 0 }        description: { type: string }

Documentation Checklist

  • All endpoints documented with examples
  • Authentication methods explained
  • Error responses specified
  • Rate limits documented
  • Pagination explained
  • Webhooks documented (if applicable)
  • SDK examples in multiple languages

Best Practices

  • Use OpenAPI 3.0+ specification
  • Include request/response examples
  • Document all parameters and headers
  • Provide authentication examples
  • Enable interactive API exploration
  • Maintain version documentation
  • Include migration guides for breaking changes

Tools

  • Swagger Editor / Swagger UI
  • Redoc
  • Postman Documentation
  • Stoplight

来源与署名

来源:secondsky/claude-skills位于plugins/api-reference-documentation/skills/api-reference-documentation提交8837836

许可证: MIT

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架