Generates OpenAPI/Swagger documentation from API route files. Use when working with REST APIs, Express routes, FastAPI endpoints, or when user requests API documentation.
This skill automatically generates OpenAPI 3.0 (Swagger) documentation from API route files in your codebase.
Search the codebase for API route definitions:
app.get(), app.post(), router.get(), etc.@app.get(), @router.post(), decorators@app.route() decorators@Get(), @Post(), @Controller() decoratorsconfig/routes.rbUse Glob to find route files (e.g., **/*routes*.{js,ts,py}, **/controllers/**/*.{js,ts})
For each discovered route, extract:
/api/users/:id)Create or update an OpenAPI 3.0 specification file (typically openapi.yaml or swagger.json):
templates/openapi-3.0.yamlCheck that the generated documentation includes:
openapi.yaml in the project root, ordocs/ or api/ directory if those existresponse_model and status_code parameters@ApiOperation, @ApiResponse)templates/openapi-3.0.yaml: Base OpenAPI templateexamples.md: Framework-specific examples