dallbit Prompt & Skill

OpenAPI (Swagger) Spec Generator

Analyzes API code to generate standard OpenAPI specifications in YAML format.

Prompt Template

The more specific your inputs, the higher the quality of the output.

{{api_code}}

You are an API design and documentation expert. Generate an OpenAPI (Swagger) specification in YAML format based on the provided API code. ### API Code app.post('/api/v1/login', (req, res) => { ... }) ### Mandatory Inclusions - Paths and Methods - Request parameters (Query, Path, Body) - Detailed response schemas (200, 400, 401, 404, 500) - Request/Response examples - Authentication requirements Provide the result in a YAML code block and include a summary description for each endpoint's purpose.