[RMP Optimized] API Documentation Generator
8.8/10Overall
8.8AI
No user ratings
Optimized from: API Documentation Generator
Submitted Aug 12AI evaluated Aug 12
Prompt
Create comprehensive API documentation using the OpenAPI/Swagger format. Please follow the structure outlined below:
### API Overview
- **API Name**: {name}
- **Version**: {version number}
- **Purpose**: {what it does}
- **Architecture**: {REST/GraphQL/gRPC}
### Endpoints
- List all endpoints with their respective HTTP methods (GET, POST, etc.) and a brief description of each endpoint's functionality.
### Authentication
- Specify the authentication method (e.g., OAuth 2.0, API Key) and detail any requirements or steps needed for setup.
### Data Models
- Describe key objects, their attributes, and relationships. Include examples of JSON or XML representations where applicable.
### Documentation Sections
1. **Getting Started Guide**
- **Prerequisites**: List any software or accounts needed before using the API.
- **Authentication Setup**: Step-by-step instructions for authentication.
- **First API Call**: Example of making the first API call with expected output.
- **Common Use Cases**: Describe typical scenarios where the API would be used.
2. **Endpoint Reference**
- **Request Format**: Describe the structure of requests for each endpoint.
- **Parameters**: Clearly distinguish between required and optional parameters, including data types and constraints.
- **Response Structure**: Provide an example response for each endpoint, including success and error responses.
- **Error Codes**: List potential error codes with explanations and suggested resolutions.
- **Rate Limits**: Specify any rate limiting policies and how they affect API usage.
3. **Code Examples**
- Provide code snippets in multiple programming languages (e.g., Python, JavaScript, Java) for common scenarios.
- Include examples of error handling and best practices for using the API effectively.
4. **Advanced Topics**
- **Webhooks**: Explain how to set up and use webhooks.
- **Pagination**: Describe how to handle pagination in responses.
- **Filtering/Sorting**: Provide guidelines on how to filter and sort data in API requests.
- **Versioning**: Discuss how versioning is handled and best practices for maintaining compatibility.
### Edge Cases
- Identify potential edge cases (e.g., network failures, invalid inputs) and how the API handles them. Include suggestions for developers on how to manage these scenarios effectively.
Optimization Improvements
- •Added headings and bullet points for better readability and structure.
- •Specified the use of OpenAPI/Swagger format explicitly in the prompt.
- •Included detailed examples and descriptions for each section to enhance clarity.
- •Defined success criteria for each section to guide the documentation process.
- •Addressed edge cases to ensure comprehensive coverage of potential issues.
The optimization focuses on enhancing clarity, structure, and specificity, making it easier for the model to generate comprehensive and actionable API documentation. By explicitly outlining expectations and including examples, the prompt is more likely to yield consistent and useful outputs.
AI Evaluation
How we evaluateGPT-4 Mini
AI Evaluation
8.8/10
User Rating
No ratings yet. Be the first to rate!
Rate this prompt
Your 5-star rating is doubled to match our 10-point scale for fair comparison with AI scores.