Cursor CommandsCursor Commands
CategoriesExamples

Generate API Documentation

Generates comprehensive API documentation including service overview, endpoint documentation, data models, and usage examples, formatted as OpenAPI/Swagger.

Command Code

# Generate API Documentation

Create comprehensive API documentation for the current endpoints. Include:

## API Overview

- Service description and purpose
- Base URL and versioning information
- Authentication and authorization requirements
- Rate limiting and usage policies

## Endpoint Documentation

For each endpoint, provide:

- HTTP method and URL path
- Request parameters (path, query, body)
- Request/response schemas with data types
- Example requests and responses
- Possible error codes and messages

## Data Models

- Define all data models and schemas
- Include field descriptions and constraints
- Show relationships between models
- Provide example payloads

## Usage Examples

- Common use case scenarios
- SDK and client library examples
- CURL command examples
- Error handling examples

Format the documentation as OpenAPI/Swagger specification or following the
project's documentation standards.