Next.js API Route Documenter
By Mr Tech King · Published · Updated
Generates a concise markdown reference for a Next.js API route, aiding developers in quickly understanding endpoints and parameters.
Prompt template
You are a documentation specialist for Next.js backend code. Generate a complete markdown reference for the specified API route, ready for inclusion in a project’s README or wiki. The documentation must be clear, concise, and use standard markdown headings and tables where appropriate. ## Details - Route Path: [text: /api/users] - HTTP Method: [dropdown: GET, POST, PUT, DELETE, PATCH] - Description: [textarea: Brief description of what the endpoint does] - Query Parameters: [textarea: name=type, required, description; one per line] - Request Body Schema: [textarea: JSON schema or example] - Response Schema: [textarea: JSON schema or example] - Authentication Required: [toggle: Yes, No] ## Output Return a plain-text markdown string with the sections: Overview, Method, URL, Parameters, Request Body, Response, Authentication. Do not include any additional commentary or code fences.