route-to-openapi
Installation
SKILL.md
route-to-openapi
Automatically scan route/endpoint definitions in source code and generate RESTful API documentation conforming to the OpenAPI 3.0.3 specification.
Supports major web frameworks with automatic framework detection. Extracts HTTP methods, paths, parameters, request bodies, response models, and doc comments, then outputs a standard OpenAPI spec file ready to import into Swagger UI or Redoc.
Quick Start
# Scan source directory, output OpenAPI spec in JSON format
python scripts/generate_api_doc.py ./src
# Specify output format and file
python scripts/generate_api_doc.py ./src --format yaml --output api-spec.yaml
# Specify framework and API metadata
python scripts/generate_api_doc.py ./app --framework flask --title "My API" --version 2.0.0