Skip to content

Writing API Documentation with GitHub Copilot

Prompt 1: Generating Comprehensive API Documentation

Use Case: To help developers create clear, comprehensive API documentation for endpoints using GitHub Copilot.

Prompt: You need to document an API endpoint. The endpoint details are as follows:

endpoint_name: {endpoint_name}
http_method: {http_method}
endpoint_url: {endpoint_url}
description: {description}
request_parameters: {request_parameters}
response_structure: {response_structure}
authentication_required: {authentication_required}
error_responses: {error_responses}

Generate comprehensive API documentation including:
- Endpoint overview
- Request format with example
- Response format with example
- Error codes and handling
- Usage notes/limitations