Loading your workspace
This prompt guides an AI to generate comprehensive, standardized API documentation directly from provided source code files. It's designed for developers and technical writers seeking to automate the creation and maintenance of up-to-date API references without manual effort.
AY Automate Original on ayautomate.comViewYour role is to act as an expert technical documentation specialist with deep knowledge of API design principles and clear, concise technical writing. Your objective is to generate standardized API documentation for a given set of source code files, adhering strictly to a specified format and style guide. Required Inputs: 1. **[API_TOPIC_NAME]**: A descriptive name for the API or module being documented (e.g., 'User Management Service API', 'Payment Gateway Integration'). 2. **[SOURCE_CODE_FILES]**: The full content of all relevant source code files that define the API endpoints, data models, and business logic. Include all necessary files, even dependencies, to ensure complete understanding. Clearly label each file (e.g., 'File: user_api.py', 'File: models.js'). 3. **[OUTPUT_FORMAT_SPEC]**: A detailed description of the desired output format for the documentation. This must include: * The overall structure (e.g., Markdown, reStructuredText, JSON). * How sections should be organized (e.g., H2 for each endpoint, H3 for request/response details). * Specific elements to include for each endpoint (e.g., HTTP method, URL path, description, request parameters with type/description/required status, example request body, example successful response body, common error codes with descriptions). * Instructions for handling data models or schemas (e.g., dedicated section, inline definitions). 4. **[STYLE_GUIDE_RULES]**: A list of specific stylistic and linguistic rules to follow. Examples include: * Avoid marketing jargon or promotional language. * Maintain a neutral, objective, and factual tone. * Do not use future tense or speculative language (e.g., 'will return', 'might be'). * Ensure consistent terminology for common concepts (e.g., 'resource identifier' instead of 'ID', 'unique key'). * Specify any preferred formatting for code examples (e.g., JSON, YAML, XML). Execution Steps: 1. Analyze the provided `[SOURCE_CODE_FILES]` to identify all API endpoints, their associated HTTP methods, URL paths, input parameters, data structures, and potential response types (both success and error). 2. Extract the purpose and functionality of each identified endpoint and data model. 3. Synthesize this information into documentation sections as per the `[OUTPUT_FORMAT_SPEC]`. 4. For each endpoint, generate a realistic example request body and a corresponding example successful response body, based on the identified data structures and expected behavior. 5. Identify and list common error conditions and their corresponding HTTP status codes or error messages based on the code's logic or common API design patterns. 6. Apply all `[STYLE_GUIDE_RULES]` rigorously throughout the generated documentation. 7. Organize the documentation logically under the `[API_TOPIC_NAME]` umbrella. Output Contract: Produce a single, self-contained documentation file in the specified `[OUTPUT_FORMAT_SPEC]`. The output must be ready for immediate consumption or integration into a documentation portal. It must not contain any conversational text or explanations outside the documentation itself. Constraints: * The documentation must be purely descriptive and objective; no interpretative or speculative content. * Every element specified in `[OUTPUT_FORMAT_SPEC]` must be present for each relevant API component. * The `[STYLE_GUIDE_RULES]` are non-negotiable and must be strictly followed. * Do not invent functionality not present or clearly implied by the `[SOURCE_CODE_FILES]`. Quality Check: Review the generated documentation to ensure: 1. All API endpoints and their functionalities are accurately represented. 2. The output strictly adheres to the `[OUTPUT_FORMAT_SPEC]`. 3. All `[STYLE_GUIDE_RULES]` have been perfectly applied. 4. Example requests and responses are valid and consistent with the API's design. 5. The documentation is clear, unambiguous, and easy for a developer to understand and use.
A verified free TECH4SSD account unlocks these tools. Joining the newsletter is a separate, optional choice and does not grant account access.
Account access does not add you to Kit. If you choose the newsletter, we record your opt-in separately; delivery begins only after the email setup is ready.
Original inspiration credited to AY Automate.
Continue exploring
Explore
Connect
Claude
Claude
Claude
Anthropic Claude
Claude
Anthropic Claude
Claude
Claude
Claude
claude
Claude
Claude Code
Claude
Claude 3.7 Sonnet
Claude
Claude
Claude
ChatGPT
ChatGPT
ChatGPT
ChatGPT