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 從公開儲存庫中收錄這些內容。

檢舉或申請下架