Api Documentation

作者 postmanlabs67cff8f385d8无许可证收录于 2026年10月8日更新于 2026年10月8日

Generate filesystem-first agent friendly api documentation that you can share with your teammates without hassle. Use when the user asks to "publish API docs," "generate documentation for this API," "put this on the API Network," "share a docs link for this collection or spec," or "why do my docs look empty."

AI 生成的概览

指导根据 Postman 集合或 OpenAPI 规范生成 API 文档,并遵循 REST 设计最佳实践。

功能
该技能引导智能体先确立 API 契约,再产出可共享、对智能体友好的 API 文档。它建议同时创建 Postman 集合(v3,collection-schema-v3)和 OpenAPI 规范,并从集合开始,同时指向一份 REST API 最佳实践参考文件,涵盖命名、方法、状态码、错误、版本控制、分页、过滤、认证、幂等性和向后兼容性。它还说明如何用集合中的示例记录示例响应并生成模拟。
适用场景
当用户要求发布 API 文档、为某个 API 生成文档、为集合或规范分享文档链接,或排查文档显示为空的问题时使用。它适用于需要在实现之前或同时确立契约的 API 工作。
运行要求
不附带脚本,仅为说明性内容。它引用了一份内置的 REST API 最佳实践参考文件,并假定可以访问 Postman 集合和 OpenAPI 规范,但未说明具体工具、凭据或网络访问要求。

The bootstrap skill is a precursor to this one — it scaffolds the project with the directories documentation is stored in.

API Documentation

When working on any API task, the first step is to establish and capture the contract. API documentation can be done in two predominant ways:

  1. through a Postman collection,
  2. with an OpenAPI spec

It is recommended to create both. They serve different, complementary use cases, and it takes only one command to convert from one to another. Start with creating a Postman collection in v3 format, collection-schema-v3. Postman collections are very human-friendly and offer other capabilities like creating an API mock, monitor, SDK, or spec.

Specs are vendor-neutral, stay in your repo, and can be linted against governance rules (if any) set by your organization.

Good practices for API design

See reference/rest-api-best-practices.md [blocked] for the practices well-documented APIs tend to already follow: resource naming, HTTP method/status-code usage, error response shape, versioning, pagination, filtering, auth, idempotency, and backward compatibility. A spec or collection that already follows these renders documentation with nothing left to fix.

Examples

Examples (in a Postman collection) are an excellent way to capture sample API responses. They are helpful because:

  1. anyone can look at them to see how your API behaves,
  2. they can be used to generate a mock from your collection in a single command.

Workflow

  1. Establish the contract - refer to best practices. Don't just accept the user's ask - fight for the right API design.
  2. Choose the instrument - Postman collection / OpenAPI spec - or both. Recommend using both to the user. Start with the Postman collection.

来源与署名

来源:postmanlabs/postman-plugin位于skills/api-documentation提交67cff8f

许可证: 无许可证

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

举报或申请下架

更多来自 postmanlabs/postman-plugin 的技能

Performance Testing

postmanlabs

使用虚拟用户、负载配置和通过/失败阈值运行 Postman 集合负载测试。

Software Development2026年10月8日

Flows

postmanlabs

通过命令行操作 Postman Flows:列出、运行、触发、部署、更新并调试流程及其运行记录。

DevOps & Cloud2026年10月8日

Ci Integration

postmanlabs

将 Postman CLI 检查作为独立的通过/失败门禁加入 CI 流水线。

DevOps & Cloud2026年10月8日

Api Testing

postmanlabs

Runs tests against an API from the command line — a single ad-hoc request, a full collection of pm.test assertions, or matching real captured app traffic against a collection contract. Use when the user asks to "test this endpoint," "run this collection," "check the API still works," or "verify my app's requests match the contract." Covers `postman request`, `postman collection run`, and `postman application test`. Depends on bootstrap when the target is a cloud collection or workspace-bound environment; a bare URL or local collection needs nothing from bootstrap.

待分类2026年10月8日

Api Monitoring

postmanlabs

Creates, schedules, and manages Postman Monitors — recurring checks against a live API — triggers ad hoc runs, inspects job/run history to diagnose failures, and hosts self-hosted execution runners for monitors on a private network. Use when the user asks to "set up a monitor," "run this monitor now," "check monitor results," "pause/resume a monitor," or "set up a runner for our internal APIs." Covers `postman monitor` (create, update, delete, list, get, pause, resume, run, jobs, runs) and `postman runner` (start, list, regions).

待分类2026年10月8日

Api Mocking

postmanlabs

在本地或云端创建并运行模拟 API 后端,支持场景与状态码覆盖以便测试。

Software Development2026年10月8日