api-docs-generator

Generate structured Markdown API references from source code, OpenAPI specs, or route definitions.

842|287|Updated Apr 25, 2024
One-click install
npx skills add https://github.com/pnp/copilot-prompts --skill api-docs-generator-pnp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-docs-generator
Source: https://github.com/pnp/copilot-prompts/tree/main/samples/skills/api-docs-generator
Command: npx skills add https://github.com/pnp/copilot-prompts --skill api-docs-generator-pnp

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Creating comprehensive API documentation is time-consuming and error-prone when done manually. This skill automates the generation of structured Markdown API references from source code, OpenAPI specs, or route definitions, ensuring consistency and reducing manual effort.

Core Features & Use Cases

  • Multi-source support: Generates docs from code (controllers, routes), OpenAPI/Swagger specs, or route definitions across languages/frameworks.
  • Endpoint-focused documentation: Produces per-endpoint details including methods, paths, parameters, responses, and curl examples.
  • Auth and versioning notes: Captures authentication requirements and base URL guidance for accurate integration docs.
  • Use Case: A team with a REST API can auto-generate an up-to-date reference doc from their OpenAPI spec and controller code, then publish it to MkDocs or Docusaurus.

Quick Start

Open a source file and say: "Document this API" to generate a complete Markdown API reference.

Frequently Asked Questions about api-docs-generator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I auto-generate API documentation from source code?

To auto-generate API documentation, open a source file and trigger the skill to analyze controllers, routes, or OpenAPI specs, producing structured Markdown API references with endpoints, parameters, and curl examples.

Can I generate Markdown API docs from an OpenAPI or Swagger spec?

Yes, you can generate Markdown API docs directly from OpenAPI or Swagger specs. The skill extracts endpoints, methods, parameters, responses, and auth details to create structured documentation.

Does the API documentation generator work across different programming languages and frameworks?

Yes, the API documentation generator applies across languages and frameworks. It analyzes route definitions and source code regardless of the specific tech stack to extract exact paths and types.

What is the best way to document REST API endpoints with curl examples?

The best way to document REST API endpoints with curl examples is to use an automated generator that extracts endpoints, parameters, and responses from source code or specs, ensuring exact paths and types.

Will the generator invent API endpoints if my source code or spec is incomplete?

No, the generator avoids inventing endpoints. It ensures exact paths and types from the source material, and explicitly notes ambiguities in the documentation when the input code or spec is incomplete.